Prevent a null reference when giving items.
parent
d262a9adbf
commit
0092ecbce7
|
@ -152,6 +152,12 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Inventory.Transfer
|
||||||
new UUID(im.toAgentID),
|
new UUID(im.toAgentID),
|
||||||
client.AgentId, itemID);
|
client.AgentId, itemID);
|
||||||
|
|
||||||
|
if (itemCopy == null)
|
||||||
|
{
|
||||||
|
client.SendAgentAlertMessage("Can't find item to give. Nothing given.", false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
byte[] itemCopyID = itemCopy.ID.GetBytes();
|
byte[] itemCopyID = itemCopy.ID.GetBytes();
|
||||||
|
|
||||||
Array.Copy(itemCopyID, 0, im.binaryBucket, 1, 16);
|
Array.Copy(itemCopyID, 0, im.binaryBucket, 1, 16);
|
||||||
|
|
Loading…
Reference in New Issue