Prevent a null reference when giving items.

0.6.1-post-fixes
Melanie Thielker 2008-11-21 00:54:32 +00:00
parent d262a9adbf
commit 0092ecbce7
1 changed files with 6 additions and 0 deletions

View File

@ -152,6 +152,12 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Inventory.Transfer
new UUID(im.toAgentID),
client.AgentId, itemID);
if (itemCopy == null)
{
client.SendAgentAlertMessage("Can't find item to give. Nothing given.", false);
return;
}
byte[] itemCopyID = itemCopy.ID.GetBytes();
Array.Copy(itemCopyID, 0, im.binaryBucket, 1, 16);