From ec494275a2eead0552f2f9819ceedbb4297bd7b5 Mon Sep 17 00:00:00 2001 From: Tedd Hansen Date: Sun, 21 Sep 2008 01:09:54 +0000 Subject: More locks, try's and disable some things in SEC - maybe it won't crash now. :) --- OpenSim/ApplicationPlugins/ScriptEngine/ComponentLoader.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'OpenSim/ApplicationPlugins/ScriptEngine/ComponentLoader.cs') diff --git a/OpenSim/ApplicationPlugins/ScriptEngine/ComponentLoader.cs b/OpenSim/ApplicationPlugins/ScriptEngine/ComponentLoader.cs index ab39568..c89da81 100644 --- a/OpenSim/ApplicationPlugins/ScriptEngine/ComponentLoader.cs +++ b/OpenSim/ApplicationPlugins/ScriptEngine/ComponentLoader.cs @@ -72,13 +72,19 @@ namespace OpenSim.ApplicationPlugins.ScriptEngine { // We have found an type which is derived from ProdiverBase, add it to provider list m_log.InfoFormat("[ScriptEngine]: Adding component: {0}", componentType.Name); - ComponentRegistry.providers.Add(componentType.Name, componentType); + lock (ComponentRegistry.providers) + { + ComponentRegistry.providers.Add(componentType.Name, componentType); + } } if (componentType.IsSubclassOf(typeof(RegionScriptEngineBase))) { // We have found an type which is derived from RegionScriptEngineBase, add it to engine list m_log.InfoFormat("[ScriptEngine]: Adding script engine: {0}", componentType.Name); - ComponentRegistry.scriptEngines.Add(componentType.Name, componentType); + lock (ComponentRegistry.scriptEngines) + { + ComponentRegistry.scriptEngines.Add(componentType.Name, componentType); + } } } } -- cgit v1.1