From 00a38df75a254e7d88c0a69d8863b55e1c2a9667 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Tue, 8 Jul 2008 16:57:48 +0000 Subject: [PATCH] * Guard against a failure to find an inventory item in a move request by complaining in the log rather than terminating the session --- OpenSim/Region/Environment/Scenes/Scene.Inventory.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs index b479fedd69..b0e4a87a3d 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs @@ -968,12 +968,19 @@ namespace OpenSim.Region.Environment.Scenes } TaskInventoryItem taskItem = part.GetInventoryItem(itemId); + + if (null == taskItem) + { + m_log.WarnFormat("[PRIM INVENTORY]: Move of inventory item {0} from prim with local id {1} failed" + + " because the inventory item could not be found", + itemId, primLocalId); + + return; + } // Only owner can copy if (remoteClient.AgentId != taskItem.OwnerID) - { return; - } MoveTaskInventoryItem(remoteClient, folderId, part, itemId); }