From 4b9c94a3aa57faa2c18c1e9a4570f9e10ef3f84a Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Fri, 27 Jan 2017 13:10:57 +0000 Subject: bug fix: wrong enabled check --- OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs | 3 --- .../Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs | 7 ++----- 2 files changed, 2 insertions(+), 8 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs index a369c30..c00112b 100644 --- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs @@ -349,9 +349,6 @@ namespace OpenSim.Region.CoreModules.World.Permissions if (!m_Enabled) return; - if(scene != m_scene) - return; - m_scene.UnregisterModuleInterface(this); scenePermissions.OnBypassPermissions -= BypassPermissions; diff --git a/OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs b/OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs index 6f2eedc..af32d05 100644 --- a/OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs +++ b/OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs @@ -78,9 +78,8 @@ namespace OpenSim.Region.OptionalModules public void AddRegion(Scene scene) { if (!m_enabled) - { return; - } + m_scene = scene; scene.Permissions.OnRezObject += CanRezObject; scene.Permissions.OnObjectEntry += CanObjectEnter; @@ -91,10 +90,8 @@ namespace OpenSim.Region.OptionalModules public void RemoveRegion(Scene scene) { - if (m_enabled) - { + if (!m_enabled) return; - } m_scene.Permissions.OnRezObject -= CanRezObject; m_scene.Permissions.OnObjectEntry -= CanObjectEnter; -- cgit v1.1