Fix a nullref on autoreturn

prebuild-update
Melanie 2010-06-29 20:36:17 +01:00
parent 0a82d10fc4
commit 5964084d25
1 changed files with 18 additions and 6 deletions

View File

@ -1574,13 +1574,25 @@ namespace OpenSim.Region.Framework.Scenes
// for when deleting the object from it // for when deleting the object from it
ForceSceneObjectBackup(grp); ForceSceneObjectBackup(grp);
if (!Permissions.CanTakeCopyObject(grp.UUID, remoteClient.AgentId)) if (remoteClient == null)
permissionToTakeCopy = false; {
if (!Permissions.CanTakeObject(grp.UUID, remoteClient.AgentId)) // Autoreturn has a null client. Nothing else does. So
permissionToTake = false; // allow only returns
if (action != DeRezAction.Return)
return;
if (!Permissions.CanDeleteObject(grp.UUID, remoteClient.AgentId)) permissionToTakeCopy = false;
permissionToDelete = false; }
else
{
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;
}
} }