From f49c85026936f3168cbea216fa3234682ec27db9 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Fri, 29 Jun 2012 00:11:44 +0100 Subject: [PATCH] If a link points to a non-existing item in FetchInventory caps, then don't try to add it to the return data rather than suffering an exception later on --- .../WebFetchInventoryDescendents/WebFetchInvDescHandler.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs b/OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs index 1bd716b411..e6033f9f2a 100644 --- a/OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs +++ b/OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs @@ -301,7 +301,8 @@ namespace OpenSim.Capabilities.Handlers InventoryItemBase linkedItem = m_InventoryService.GetItem(new InventoryItemBase(link.AssetID)); - itemsToReturn.Insert(0, linkedItem); + if (linkedItem != null) + itemsToReturn.Insert(0, linkedItem); } } }