From bd19cf739a03e255b0bf46021d3fab6ea0148afb Mon Sep 17 00:00:00 2001 From: Tom Grimshaw Date: Sat, 26 Jun 2010 12:38:08 -0700 Subject: Fix a bug with DeRezObjects (check for a null remoteClient) --- OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 5e1798b..83fd349 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs @@ -1591,15 +1591,17 @@ namespace OpenSim.Region.Framework.Scenes // So that we know the database is upto date, // for when deleting the object from it ForceSceneObjectBackup(grp); + if (remoteClient != null) + { + if (!Permissions.CanTakeCopyObject(grp.UUID, remoteClient.AgentId)) + permissionToTakeCopy = false; + if (!Permissions.CanTakeObject(grp.UUID, remoteClient.AgentId)) + permissionToTake = false; - if (!Permissions.CanTakeCopyObject(grp.UUID, remoteClient.AgentId)) - permissionToTakeCopy = false; - if (!Permissions.CanTakeObject(grp.UUID, remoteClient.AgentId)) - permissionToTake = false; - - if (!Permissions.CanDeleteObject(grp.UUID, remoteClient.AgentId)) - permissionToDelete = false; + if (!Permissions.CanDeleteObject(grp.UUID, remoteClient.AgentId)) + permissionToDelete = false; + } } // Handle god perms -- cgit v1.1