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. :) --- .../ScriptEngine/RegionScriptEnginePlugin.cs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'OpenSim/ApplicationPlugins/ScriptEngine/RegionScriptEnginePlugin.cs') diff --git a/OpenSim/ApplicationPlugins/ScriptEngine/RegionScriptEnginePlugin.cs b/OpenSim/ApplicationPlugins/ScriptEngine/RegionScriptEnginePlugin.cs index c4f4bbe..0851fc3 100644 --- a/OpenSim/ApplicationPlugins/ScriptEngine/RegionScriptEnginePlugin.cs +++ b/OpenSim/ApplicationPlugins/ScriptEngine/RegionScriptEnginePlugin.cs @@ -43,13 +43,17 @@ namespace OpenSim.ApplicationPlugins.ScriptEngine public RegionScriptEngineBase scriptEngine; public void Initialise(Scene scene, IConfigSource source) { + return; // New region is being created // Create a new script engine try { - scriptEngine = - Activator.CreateInstance(ComponentRegistry.scriptEngines[tempScriptEngineName]) as - RegionScriptEngineBase; + lock (ComponentRegistry.scriptEngines) + { + scriptEngine = + Activator.CreateInstance(ComponentRegistry.scriptEngines[tempScriptEngineName]) as + RegionScriptEngineBase; + } scriptEngine.Initialize(scene, source); } catch (Exception ex) -- cgit v1.1