Don't execute rest of code in XEngine.RemoveRegion() and Close() if the module is disabled.

0.7.2-post-fixes
Justin Clark-Casey (justincc) 2011-10-14 01:06:43 +01:00
parent 0506ccb51a
commit 3a635507cc
1 changed files with 6 additions and 0 deletions

View File

@ -269,6 +269,9 @@ namespace OpenSim.Region.ScriptEngine.XEngine
public void RemoveRegion(Scene scene) public void RemoveRegion(Scene scene)
{ {
if (!m_Enabled)
return;
lock (m_Scripts) lock (m_Scripts)
{ {
m_log.InfoFormat( m_log.InfoFormat(
@ -351,6 +354,9 @@ namespace OpenSim.Region.ScriptEngine.XEngine
public void Close() public void Close()
{ {
if (!m_Enabled)
return;
lock (m_ScriptEngines) lock (m_ScriptEngines)
{ {
if (m_ScriptEngines.Contains(this)) if (m_ScriptEngines.Contains(this))