Yengine: we also need to cancel timer events in queue, because some bad scripts that do work on X

This commit is contained in:
UbitUmarov
2019-11-11 12:51:09 +00:00
parent 38a77a8bb5
commit e87dfd48bf
5 changed files with 50 additions and 2 deletions

View File

@@ -110,8 +110,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
string key = MakeTimerKey(m_localID, m_itemID);
lock (TimerListLock)
{
if (Timers.ContainsKey(key))
if (Timers.TryGetValue(key, out TimerInfo ts))
{
m_CmdManager.m_ScriptEngine.CancelScriptEvent(ts.itemID, "timer");
Timers.Remove(key);
}
}