From 94c242f79262fce6a898478c24edee78d70780d9 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 9 Dec 2011 22:36:51 +0000 Subject: Move client id check in Scene.Inventory.cs:UpdateInventoryItemAsset so that it doesn't trigger an exception if the item hasn't been found. In this situation we will now put out a slightly more meaningful log error message instead. --- OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 26eb729..b62023b 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs @@ -337,11 +337,12 @@ namespace OpenSim.Region.Framework.Scenes // Passing something to another avatar or a an object will already InventoryItemBase item = new InventoryItemBase(itemID, remoteClient.AgentId); item = InventoryService.GetItem(item); - if (item.Owner != remoteClient.AgentId) - return; if (item != null) { + if (item.Owner != remoteClient.AgentId) + return; + if (UUID.Zero == transactionID) { item.Name = itemUpd.Name; @@ -388,8 +389,9 @@ namespace OpenSim.Region.Framework.Scenes } else { - m_log.Error( - "[AGENTINVENTORY]: Item ID " + itemID + " not found for an inventory item update."); + m_log.ErrorFormat( + "[AGENTINVENTORY]: Item id {0} not found for an inventory item update for {1}.", + itemID, remoteClient.Name); } } -- cgit v1.1