* Guard against a failure to find an inventory item in a move request by complaining in the log rather than terminating the session

0.6.0-stable
Justin Clarke Casey 2008-07-08 16:57:48 +00:00
parent af825dae40
commit 00a38df75a
1 changed files with 9 additions and 2 deletions

View File

@ -969,12 +969,19 @@ namespace OpenSim.Region.Environment.Scenes
TaskInventoryItem taskItem = part.GetInventoryItem(itemId);
// Only owner can copy
if (remoteClient.AgentId != taskItem.OwnerID)
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);
}