mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-09 19:32:11 +00:00
SAGA2: Fix timer delete on removeAllTimers
This commit is contained in:
parent
b0cf10eb67
commit
abad186530
@ -1844,9 +1844,10 @@ void GameObject::removeAllTimers(void) {
|
||||
|
||||
// Get this object's timer list
|
||||
if ((timerList = fetchTimerList(this)) != nullptr) {
|
||||
for (Common::List<Timer *>::iterator it = timerList->_timers.begin(); it != timerList->_timers.end(); ++it) {
|
||||
timerList->_timers.erase(it);
|
||||
}
|
||||
for (Common::List<Timer *>::iterator it = timerList->_timers.begin(); it != timerList->_timers.end(); ++it)
|
||||
delete *it;
|
||||
|
||||
timerList->_timers.clear();
|
||||
|
||||
delete timerList;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user