diff options
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 | ||