Fix null pointer dereference in Timer::AdjustTimers.

Fixes #5783
This commit is contained in:
Gunnar Beutner 2014-03-17 08:41:53 +01:00
parent 1e9f2f57a3
commit ecce27f9da
1 changed files with 3 additions and 0 deletions

View File

@ -244,6 +244,9 @@ void Timer::AdjustTimers(double adjustment)
for (it = idx.begin(); it != idx.end(); it++) {
Timer::Ptr timer = it->lock();
if (!timer)
continue;
if (abs(now - (timer->m_Next + adjustment)) <
abs(now - timer->m_Next)) {
timer->m_Next += adjustment;