aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/XEngine.cs16
1 files changed, 10 insertions, 6 deletions
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
index 1e0f01f..2a01fc4 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
@@ -596,7 +596,11 @@ namespace OpenSim.Region.ScriptEngine.XEngine
596 if (!m_Enabled) 596 if (!m_Enabled)
597 return; 597 return;
598 lockScriptsForRead(true); 598 lockScriptsForRead(true);
599 foreach (IScriptInstance instance in m_Scripts.Values) 599
600 List<IScriptInstance> instancesToDel = new List<IScriptInstance>(m_Scripts.Values);
601
602// foreach (IScriptInstance instance in m_Scripts.Values)
603 foreach (IScriptInstance instance in instancesToDel)
600 { 604 {
601 // Force a final state save 605 // Force a final state save
602 // 606 //
@@ -619,7 +623,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
619 // Must be done explicitly because they have infinite 623 // Must be done explicitly because they have infinite
620 // lifetime 624 // lifetime
621 // 625 //
622 if (!m_SimulatorShuttingDown) 626// if (!m_SimulatorShuttingDown)
623 { 627 {
624 m_DomainScripts[instance.AppDomain].Remove(instance.ItemID); 628 m_DomainScripts[instance.AppDomain].Remove(instance.ItemID);
625 if (m_DomainScripts[instance.AppDomain].Count == 0) 629 if (m_DomainScripts[instance.AppDomain].Count == 0)
@@ -629,10 +633,10 @@ namespace OpenSim.Region.ScriptEngine.XEngine
629 } 633 }
630 } 634 }
631 635
632 m_Scripts.Clear(); 636// m_Scripts.Clear();
633 m_PrimObjects.Clear(); 637// m_PrimObjects.Clear();
634 m_Assemblies.Clear(); 638// m_Assemblies.Clear();
635 m_DomainScripts.Clear(); 639// m_DomainScripts.Clear();
636 } 640 }
637 lockScriptsForRead(false); 641 lockScriptsForRead(false);
638 lockScriptsForWrite(true); 642 lockScriptsForWrite(true);