mirror of
https://github.com/opensim/opensim.git
synced 2026-05-31 06:45:53 +08:00
Fixed bug that occurs sometimes on script unload where queued script event was attempted executed after AppDomain was unloaded.
This commit is contained in:
@@ -362,9 +362,18 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
|
||||
// Execute a function in the script
|
||||
//m_scriptEngine.Log.Verbose("ScriptEngine", "Executing Function localID: " + localID + ", itemID: " + itemID + ", FunctionName: " + FunctionName);
|
||||
LSL_BaseClass Script = m_scriptEngine.myScriptManager.GetScript(localID, itemID);
|
||||
if (Script == null)
|
||||
return;
|
||||
|
||||
// Must be done in correct AppDomain, so leaving it up to the script itself
|
||||
Script.Exec.ExecuteEvent(FunctionName, args);
|
||||
try
|
||||
{
|
||||
Script.Exec.ExecuteEvent(FunctionName, args);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Console.WriteLine("Exception executing script funcion: " + e.ToString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user