From cf9b3e7708f0cf58c94fcfd76974733c37ac0d1c Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 21 Feb 2012 23:41:48 +0000 Subject: Restore the taskItem null check that I accidentally blatted in 5397a6d This is a valid check because the caller could supply an invalid uuid. --- OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 83e3a45..23f39a8 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs @@ -1146,6 +1146,15 @@ namespace OpenSim.Region.Framework.Scenes TaskInventoryItem taskItem = part.Inventory.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; + } + if ((taskItem.CurrentPermissions & (uint)PermissionMask.Copy) == 0) { // If the item to be moved is no copy, we need to be able to -- cgit v1.1