diff options
author | Justin Clark-Casey (justincc) | 2014-02-20 22:35:41 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2014-02-20 22:35:41 +0000 |
commit | d50d169441d7394e1391d2d6b862a5607c07c6a0 (patch) | |
tree | 75f9e9a59396bf27052171b1110ae08fcd01bde4 | |
parent | minor: Add some method doc to AFM,SetAppearanceAssets() (diff) | |
download | opensim-SC_OLD-d50d169441d7394e1391d2d6b862a5607c07c6a0.zip opensim-SC_OLD-d50d169441d7394e1391d2d6b862a5607c07c6a0.tar.gz opensim-SC_OLD-d50d169441d7394e1391d2d6b862a5607c07c6a0.tar.bz2 opensim-SC_OLD-d50d169441d7394e1391d2d6b862a5607c07c6a0.tar.xz |
If GetFolderContent called by WebFetchInvDescHandler.Fetch() fails for some reason and returns null, log and return empty contents rather than throwing an exception that ends up terminating the simulator.
-rw-r--r-- | OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs | 10 | ||||
-rw-r--r-- | OpenSim/Services/Interfaces/IInventoryService.cs | 2 |
2 files changed, 10 insertions, 2 deletions
diff --git a/OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs b/OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs index 9a6ca86..b222d4b 100644 --- a/OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs +++ b/OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs | |||
@@ -238,7 +238,15 @@ namespace OpenSim.Capabilities.Handlers | |||
238 | 238 | ||
239 | if (folderID != UUID.Zero) | 239 | if (folderID != UUID.Zero) |
240 | { | 240 | { |
241 | contents = m_InventoryService.GetFolderContent(agentID, folderID); | 241 | InventoryCollection fetchedContents = m_InventoryService.GetFolderContent(agentID, folderID); |
242 | |||
243 | if (fetchedContents == null) | ||
244 | { | ||
245 | m_log.WarnFormat("[WEB FETCH INV DESC HANDLER]: Could not get contents of folder {0} for user {1}", folderID, agentID); | ||
246 | return contents; | ||
247 | } | ||
248 | |||
249 | contents = fetchedContents; | ||
242 | InventoryFolderBase containingFolder = new InventoryFolderBase(); | 250 | InventoryFolderBase containingFolder = new InventoryFolderBase(); |
243 | containingFolder.ID = folderID; | 251 | containingFolder.ID = folderID; |
244 | containingFolder.Owner = agentID; | 252 | containingFolder.Owner = agentID; |
diff --git a/OpenSim/Services/Interfaces/IInventoryService.cs b/OpenSim/Services/Interfaces/IInventoryService.cs index a8bfe47..36634a3 100644 --- a/OpenSim/Services/Interfaces/IInventoryService.cs +++ b/OpenSim/Services/Interfaces/IInventoryService.cs | |||
@@ -91,7 +91,7 @@ namespace OpenSim.Services.Interfaces | |||
91 | /// </summary> | 91 | /// </summary> |
92 | /// <param name="userId"></param> | 92 | /// <param name="userId"></param> |
93 | /// <param name="folderID"></param> | 93 | /// <param name="folderID"></param> |
94 | /// <returns></returns> | 94 | /// <returns>Inventory content. null if the request failed.</returns> |
95 | InventoryCollection GetFolderContent(UUID userID, UUID folderID); | 95 | InventoryCollection GetFolderContent(UUID userID, UUID folderID); |
96 | 96 | ||
97 | /// <summary> | 97 | /// <summary> |