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.
parent
28419251bf
commit
d50d169441
|
@ -238,7 +238,15 @@ namespace OpenSim.Capabilities.Handlers
|
||||||
|
|
||||||
if (folderID != UUID.Zero)
|
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();
|
InventoryFolderBase containingFolder = new InventoryFolderBase();
|
||||||
containingFolder.ID = folderID;
|
containingFolder.ID = folderID;
|
||||||
containingFolder.Owner = agentID;
|
containingFolder.Owner = agentID;
|
||||||
|
|
|
@ -91,7 +91,7 @@ namespace OpenSim.Services.Interfaces
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="userId"></param>
|
/// <param name="userId"></param>
|
||||||
/// <param name="folderID"></param>
|
/// <param name="folderID"></param>
|
||||||
/// <returns></returns>
|
/// <returns>Inventory content. null if the request failed.</returns>
|
||||||
InventoryCollection GetFolderContent(UUID userID, UUID folderID);
|
InventoryCollection GetFolderContent(UUID userID, UUID folderID);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
Loading…
Reference in New Issue