From ee84c0589ccca1e7f3216ca1395c3002b773f30f Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 14 Oct 2011 01:06:43 +0100 Subject: Don't execute rest of code in XEngine.RemoveRegion() and Close() if the module is disabled. --- OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs index f6afcdb..2a0ec37 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs @@ -269,6 +269,9 @@ namespace OpenSim.Region.ScriptEngine.XEngine public void RemoveRegion(Scene scene) { + if (!m_Enabled) + return; + lock (m_Scripts) { m_log.InfoFormat( @@ -351,6 +354,9 @@ namespace OpenSim.Region.ScriptEngine.XEngine public void Close() { + if (!m_Enabled) + return; + lock (m_ScriptEngines) { if (m_ScriptEngines.Contains(this)) -- cgit v1.1