TIMER: Remove name of callback in removeTimerProc.
This should fix #3389673 "LOOM: CD-Version crashes at start". It also fixes the
same error showing up for me in Monkey CD.
The doc changes in 4c7958450f
claims the name is used for the event
recorder, but as far as I can tell it is not used right now. Thus depending on
how it is used the behavior of SCUMM removing and adding the same timer aagain
*might* cause problems.
In any way we need to remove the name in removeTimerProc, else RTL + launching
the same game again would be broken too.
This commit is contained in:
parent
f049e6788a
commit
cea06991eb
1 changed files with 7 additions and 0 deletions
|
@ -161,4 +161,11 @@ void DefaultTimerManager::removeTimerProc(TimerProc callback) {
|
|||
slot = slot->next;
|
||||
}
|
||||
}
|
||||
|
||||
for (TimerSlotMap::iterator i = _callbacks.begin(), end = _callbacks.end(); i != end; ++i) {
|
||||
if (i->_value == callback) {
|
||||
_callbacks.erase(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue