mirror of
https://github.com/opensim/opensim.git
synced 2026-08-04 16:22:50 +08:00
Prevent a null reference when giving items.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user