diff options
Diffstat (limited to 'OpenSim/ApplicationPlugins/ScriptEngine')
-rw-r--r-- | OpenSim/ApplicationPlugins/ScriptEngine/RegionEngineLoader.cs | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/OpenSim/ApplicationPlugins/ScriptEngine/RegionEngineLoader.cs b/OpenSim/ApplicationPlugins/ScriptEngine/RegionEngineLoader.cs index 115d237..1023238 100644 --- a/OpenSim/ApplicationPlugins/ScriptEngine/RegionEngineLoader.cs +++ b/OpenSim/ApplicationPlugins/ScriptEngine/RegionEngineLoader.cs | |||
@@ -54,16 +54,22 @@ namespace OpenSim.ApplicationPlugins.ScriptEngine | |||
54 | // New region is being created | 54 | // New region is being created |
55 | // Create a new script engine | 55 | // Create a new script engine |
56 | // Make sure we have config | 56 | // Make sure we have config |
57 | if (ConfigSource.Configs["SECS"] == null) | 57 | try |
58 | ConfigSource.AddConfig("SECS"); | 58 | { |
59 | ScriptConfigSource = ConfigSource.Configs["SECS"]; | 59 | if (ConfigSource.Configs["SECS"] == null) |
60 | ConfigSource.AddConfig("SECS"); | ||
61 | ScriptConfigSource = ConfigSource.Configs["SECS"]; | ||
60 | 62 | ||
61 | // Is SECS enabled? | 63 | // Is SECS enabled? |
62 | if (ScriptConfigSource.GetBoolean("Enabled", false)) | 64 | if (ScriptConfigSource.GetBoolean("Enabled", false)) |
65 | { | ||
66 | LoadEngine(); | ||
67 | if (scriptEngine != null) | ||
68 | scriptEngine.Initialise(scene, source); | ||
69 | } | ||
70 | } | ||
71 | catch (NullReferenceException) | ||
63 | { | 72 | { |
64 | LoadEngine(); | ||
65 | if (scriptEngine != null) | ||
66 | scriptEngine.Initialise(scene, source); | ||
67 | } | 73 | } |
68 | } | 74 | } |
69 | 75 | ||