diff options
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs index 9622555..901144a 100644 --- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs | |||
@@ -397,10 +397,15 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
397 | // with the powers requested (powers = 0 for no powers check) | 397 | // with the powers requested (powers = 0 for no powers check) |
398 | protected bool IsGroupMember(UUID groupID, UUID userID, ulong powers) | 398 | protected bool IsGroupMember(UUID groupID, UUID userID, ulong powers) |
399 | { | 399 | { |
400 | IClientAPI client = m_scene.GetScenePresence(userID).ControllingClient; | 400 | ScenePresence sp = m_scene.GetScenePresence(userID); |
401 | 401 | if (sp != null) | |
402 | return ((groupID == client.ActiveGroupId) && (client.ActiveGroupPowers != 0) && | 402 | { |
403 | ((powers == 0) || ((client.ActiveGroupPowers & powers) == powers))); | 403 | IClientAPI client = sp.ControllingClient; |
404 | |||
405 | return ((groupID == client.ActiveGroupId) && (client.ActiveGroupPowers != 0) && | ||
406 | ((powers == 0) || ((client.ActiveGroupPowers & powers) == powers))); | ||
407 | } | ||
408 | return false; | ||
404 | } | 409 | } |
405 | 410 | ||
406 | /// <summary> | 411 | /// <summary> |