From 45563e20e0167cd0349503919a96658ca119d11e Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 16 Apr 2010 22:57:44 +0100 Subject: minor: correctly print out missing item id when it can't be found rather than a NullReferenceException --- .../ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs | 5 ++++- OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 1 - 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs index e97d21f..a2f26d5 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs @@ -311,10 +311,13 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory { // m_log.DebugFormat("[LOCAL INVENTORY SERVICES CONNECTOR]: Requesting inventory item {0}", item.ID); + UUID requestedItemId = item.ID; + item = m_InventoryService.GetItem(item); if (null == item) - m_log.ErrorFormat("[LOCAL INVENTORY SERVICES CONNECTOR]: Could not find item with id {0}", item.ID); + m_log.ErrorFormat( + "[LOCAL INVENTORY SERVICES CONNECTOR]: Could not find item with id {0}", requestedItemId); return item; } diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 4a286ac..a90c4b3 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs @@ -471,7 +471,6 @@ namespace OpenSim.Region.Framework.Scenes return null; } - if (recipientParentFolderId == UUID.Zero) { InventoryFolderBase recipientRootFolder = InventoryService.GetRootFolder(recipientId); -- cgit v1.1