diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 83e3a455d8..23f39a8c6d 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