aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorMelanie Thielker2008-11-21 00:54:32 +0000
committerMelanie Thielker2008-11-21 00:54:32 +0000
commit0092ecbce7f2b904f482cb6ccf0ccca5ed14ea12 (patch)
tree895ff4e169d6eb408a154db1fa3b03c7d8df3eb3 /OpenSim
parentUpdate CONTRIBUTORS (diff)
downloadopensim-SC_OLD-0092ecbce7f2b904f482cb6ccf0ccca5ed14ea12.zip
opensim-SC_OLD-0092ecbce7f2b904f482cb6ccf0ccca5ed14ea12.tar.gz
opensim-SC_OLD-0092ecbce7f2b904f482cb6ccf0ccca5ed14ea12.tar.bz2
opensim-SC_OLD-0092ecbce7f2b904f482cb6ccf0ccca5ed14ea12.tar.xz
Prevent a null reference when giving items.
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Environment/Modules/Avatar/Inventory/Transfer/InventoryTransferModule.cs6
1 files changed, 6 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Inventory/Transfer/InventoryTransferModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
index 85b5d3f..cb65e9e 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
@@ -152,6 +152,12 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Inventory.Transfer
152 new UUID(im.toAgentID), 152 new UUID(im.toAgentID),
153 client.AgentId, itemID); 153 client.AgentId, itemID);
154 154
155 if (itemCopy == null)
156 {
157 client.SendAgentAlertMessage("Can't find item to give. Nothing given.", false);
158 return;
159 }
160
155 byte[] itemCopyID = itemCopy.ID.GetBytes(); 161 byte[] itemCopyID = itemCopy.ID.GetBytes();
156 162
157 Array.Copy(itemCopyID, 0, im.binaryBucket, 1, 16); 163 Array.Copy(itemCopyID, 0, im.binaryBucket, 1, 16);