mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-10 09:32:29 +01:00
Skip intervals that are deleted within callbacks
This commit is contained in:
@@ -1678,6 +1678,12 @@ void ScriptEngine::UpdateIntervals()
|
||||
continue;
|
||||
}
|
||||
|
||||
if (interval.Deleted)
|
||||
{
|
||||
// There is a chance that in one of the callbacks it deletes another interval.
|
||||
continue;
|
||||
}
|
||||
|
||||
ExecutePluginCall(interval.Owner, interval.Callback, {}, false);
|
||||
|
||||
interval.LastTimestamp = timestamp;
|
||||
|
||||
Reference in New Issue
Block a user