diff options
author | Tedd Hansen | 2007-08-26 08:20:48 +0000 |
---|---|---|
committer | Tedd Hansen | 2007-08-26 08:20:48 +0000 |
commit | 25e200c46a7664eb23499c39e6a1019470e26edc (patch) | |
tree | 5b15196e57636dd45f7c530435ba1f665a2c6e20 /OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs | |
parent | Fixed error on shutdown caused by ThreadAbortException sending message throug... (diff) | |
download | opensim-SC-25e200c46a7664eb23499c39e6a1019470e26edc.zip opensim-SC-25e200c46a7664eb23499c39e6a1019470e26edc.tar.gz opensim-SC-25e200c46a7664eb23499c39e6a1019470e26edc.tar.bz2 opensim-SC-25e200c46a7664eb23499c39e6a1019470e26edc.tar.xz |
Fixed bug that occurs sometimes on script unload where queued script event was attempted executed after AppDomain was unloaded.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs index c7c33bb..5dc928a 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs | |||
@@ -362,9 +362,18 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine | |||
362 | // Execute a function in the script | 362 | // Execute a function in the script |
363 | //m_scriptEngine.Log.Verbose("ScriptEngine", "Executing Function localID: " + localID + ", itemID: " + itemID + ", FunctionName: " + FunctionName); | 363 | //m_scriptEngine.Log.Verbose("ScriptEngine", "Executing Function localID: " + localID + ", itemID: " + itemID + ", FunctionName: " + FunctionName); |
364 | LSL_BaseClass Script = m_scriptEngine.myScriptManager.GetScript(localID, itemID); | 364 | LSL_BaseClass Script = m_scriptEngine.myScriptManager.GetScript(localID, itemID); |
365 | if (Script == null) | ||
366 | return; | ||
365 | 367 | ||
366 | // Must be done in correct AppDomain, so leaving it up to the script itself | 368 | // Must be done in correct AppDomain, so leaving it up to the script itself |
367 | Script.Exec.ExecuteEvent(FunctionName, args); | 369 | try |
370 | { | ||
371 | Script.Exec.ExecuteEvent(FunctionName, args); | ||
372 | } | ||
373 | catch (Exception e) | ||
374 | { | ||
375 | Console.WriteLine("Exception executing script funcion: " + e.ToString()); | ||
376 | } | ||
368 | 377 | ||
369 | } | 378 | } |
370 | 379 | ||