diff options
author | Adam Frisby | 2008-11-08 20:31:47 +0000 |
---|---|---|
committer | Adam Frisby | 2008-11-08 20:31:47 +0000 |
commit | cbda7281837d47643b6975dd296b2cfcbc825eaa (patch) | |
tree | e876041c8e64ce3dd98b210bead67a5cfa9d0bb6 /OpenSim/ApplicationPlugins/ScriptEngine/RegionEngineLoader.cs | |
parent | Mantis#2598: Thanks Fly-Man- for a patch that fixes a client-thread crash by (diff) | |
download | opensim-SC-cbda7281837d47643b6975dd296b2cfcbc825eaa.zip opensim-SC-cbda7281837d47643b6975dd296b2cfcbc825eaa.tar.gz opensim-SC-cbda7281837d47643b6975dd296b2cfcbc825eaa.tar.bz2 opensim-SC-cbda7281837d47643b6975dd296b2cfcbc825eaa.tar.xz |
* "Fixed" a NRE with the new script engine Tedd committed
* Tedd will need to fix properly.
Diffstat (limited to '')
-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 | ||