aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2014-02-20 22:35:41 +0000
committerJustin Clark-Casey (justincc)2014-02-20 22:35:41 +0000
commitd50d169441d7394e1391d2d6b862a5607c07c6a0 (patch)
tree75f9e9a59396bf27052171b1110ae08fcd01bde4 /OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs
parentminor: Add some method doc to AFM,SetAppearanceAssets() (diff)
downloadopensim-SC-d50d169441d7394e1391d2d6b862a5607c07c6a0.zip
opensim-SC-d50d169441d7394e1391d2d6b862a5607c07c6a0.tar.gz
opensim-SC-d50d169441d7394e1391d2d6b862a5607c07c6a0.tar.bz2
opensim-SC-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.
Diffstat (limited to 'OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs')
-rw-r--r--OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs10
1 files changed, 9 insertions, 1 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;