aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-09-01 02:43:17 +0100
committerJustin Clark-Casey (justincc)2011-09-01 02:43:17 +0100
commit616e672fce793350071bff538db4a8dc033f6259 (patch)
tree14094a8869d3adb595d3007760773e294520f3da
parentrefactor: use SOG register target waypoints and rots directly instead of call... (diff)
downloadopensim-SC_OLD-616e672fce793350071bff538db4a8dc033f6259.zip
opensim-SC_OLD-616e672fce793350071bff538db4a8dc033f6259.tar.gz
opensim-SC_OLD-616e672fce793350071bff538db4a8dc033f6259.tar.bz2
opensim-SC_OLD-616e672fce793350071bff538db4a8dc033f6259.tar.xz
If the user receiving an inventory folder has left the scene by the time the acceptence message arrives, then don't send them an inventory update.
Doing so causes a NullReferenceException
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs9
1 files changed, 4 insertions, 5 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
index b4f69e6..f46d9f7 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
@@ -208,9 +208,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
208 Array.Copy(copyIDBytes, 0, im.binaryBucket, 1, copyIDBytes.Length); 208 Array.Copy(copyIDBytes, 0, im.binaryBucket, 1, copyIDBytes.Length);
209 209
210 if (user != null) 210 if (user != null)
211 {
212 user.ControllingClient.SendBulkUpdateInventory(folderCopy); 211 user.ControllingClient.SendBulkUpdateInventory(folderCopy);
213 }
214 212
215 // HACK!! 213 // HACK!!
216 im.imSessionID = folderID.Guid; 214 im.imSessionID = folderID.Guid;
@@ -240,9 +238,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
240 Array.Copy(copyID.GetBytes(), 0, im.binaryBucket, 1, 16); 238 Array.Copy(copyID.GetBytes(), 0, im.binaryBucket, 1, 16);
241 239
242 if (user != null) 240 if (user != null)
243 {
244 user.ControllingClient.SendBulkUpdateInventory(itemCopy); 241 user.ControllingClient.SendBulkUpdateInventory(itemCopy);
245 }
246 242
247 // HACK!! 243 // HACK!!
248 im.imSessionID = itemID.Guid; 244 im.imSessionID = itemID.Guid;
@@ -288,7 +284,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
288 284
289 ScenePresence fromUser = scene.GetScenePresence(new UUID(im.fromAgentID)); 285 ScenePresence fromUser = scene.GetScenePresence(new UUID(im.fromAgentID));
290 286
291 fromUser.ControllingClient.SendBulkUpdateInventory(folder); 287 // If the user has left the scene by the time the message comes back then we can't send
288 // them the update.
289 if (fromUser != null)
290 fromUser.ControllingClient.SendBulkUpdateInventory(folder);
292 }); 291 });
293 } 292 }
294 } 293 }