aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/XEngine.cs10
1 files changed, 8 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
index 49c69ab..184af19 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
@@ -150,7 +150,10 @@ namespace OpenSim.Region.ScriptEngine.XEngine
150 } 150 }
151 else 151 else
152 { 152 {
153 m_scriptsLock.ExitReadLock(); 153 if (m_scriptsLock.RecursiveReadCount > 0)
154 {
155 m_scriptsLock.ExitReadLock();
156 }
154 } 157 }
155 } 158 }
156 private void lockScriptsForWrite(bool locked) 159 private void lockScriptsForWrite(bool locked)
@@ -179,7 +182,10 @@ namespace OpenSim.Region.ScriptEngine.XEngine
179 } 182 }
180 else 183 else
181 { 184 {
182 m_scriptsLock.ExitWriteLock(); 185 if (m_scriptsLock.RecursiveWriteCount > 0)
186 {
187 m_scriptsLock.ExitWriteLock();
188 }
183 } 189 }
184 } 190 }
185 191