summaryrefslogtreecommitdiff
path: root/src/timer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/timer.cpp')
-rw-r--r--src/timer.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/timer.cpp b/src/timer.cpp
index ca7534a7c..535ed3f8b 100644
--- a/src/timer.cpp
+++ b/src/timer.cpp
@@ -26,6 +26,9 @@ void TimerManager::TickTimers(time_t TIME)
{
std::vector<Timer *>::iterator i = Timers.begin();
Timer *t = (*i);
+
+ // Probable fix: move vector manipulation to *before* we modify the vector.
+ Timers.erase(i);
t->Tick(TIME);
if (t->GetRepeat())
@@ -35,8 +38,6 @@ void TimerManager::TickTimers(time_t TIME)
}
else
delete t;
-
- Timers.erase(i);
}
}