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.

0.8.0.3
Justin Clark-Casey (justincc) 2014-02-20 22:35:41 +00:00
parent 28419251bf
commit d50d169441
2 changed files with 10 additions and 2 deletions

View File

@ -238,7 +238,15 @@ namespace OpenSim.Capabilities.Handlers
if (folderID != UUID.Zero)
{
contents = m_InventoryService.GetFolderContent(agentID, folderID);
InventoryCollection fetchedContents = m_InventoryService.GetFolderContent(agentID, folderID);
if (fetchedContents == null)
{
m_log.WarnFormat("[WEB FETCH INV DESC HANDLER]: Could not get contents of folder {0} for user {1}", folderID, agentID);
return contents;
}
contents = fetchedContents;
InventoryFolderBase containingFolder = new InventoryFolderBase();
containingFolder.ID = folderID;
containingFolder.Owner = agentID;

View File

@ -91,7 +91,7 @@ namespace OpenSim.Services.Interfaces
/// </summary>
/// <param name="userId"></param>
/// <param name="folderID"></param>
/// <returns></returns>
/// <returns>Inventory content. null if the request failed.</returns>
InventoryCollection GetFolderContent(UUID userID, UUID folderID);
/// <summary>