From 0f6b7b6a41ef40e8798638b79c4c62f00556a093 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 515637eac0..9a6ca8640a 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); } } }