BACKENDS: Fix potential race condition in DefaultTimer

This commit is contained in:
Eugene Sandulenko 2020-05-25 17:55:52 +02:00
parent 2b40cedad7
commit a94e90d838

View file

@ -84,6 +84,10 @@ void DefaultTimerManager::handler() {
uint32 curTime = g_system->getMillis(true);
// On slow systems this could still be run after destructor
if (!_head)
return;
// Repeat as long as there is a TimerSlot that is scheduled to fire.
TimerSlot *slot = _head->next;
while (slot && slot->nextFireTime < curTime) {