diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs index a369c306d0..c00112b7ed 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 6f2eedca19..af32d0515a 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;