mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-07 10:21:31 +00:00
SAGA2: Fix list removal on cleanupTimers
This commit is contained in:
parent
5e6d32062c
commit
97f90e5e2d
@ -408,18 +408,13 @@ void loadTimers(Common::InSaveFile *in) {
|
||||
// Cleanup the active Timers
|
||||
|
||||
void cleanupTimers(void) {
|
||||
Common::List<TimerList *>::iterator timerListNextIt;
|
||||
for (Common::List<TimerList *>::iterator it = g_vm->_timerLists.begin(); it != g_vm->_timerLists.end(); it = timerListNextIt) {
|
||||
timerListNextIt = it;
|
||||
timerListNextIt++;
|
||||
delete *it;
|
||||
}
|
||||
while (g_vm->_timerLists.size() > 0)
|
||||
delete g_vm->_timerLists.front();
|
||||
|
||||
Common::List<Timer *>::iterator timerNextIt;
|
||||
for (Common::List<Timer *>::iterator it = g_vm->_timers.begin(); it != g_vm->_timers.end(); it = timerNextIt) {
|
||||
timerNextIt = it;
|
||||
timerNextIt++;
|
||||
delete *it;
|
||||
while (g_vm->_timers.size() > 0) {
|
||||
Timer *t = g_vm->_timers.front();
|
||||
deleteTimer(t);
|
||||
delete t;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user