Skip to content

Commit ced33e2

Browse files
committed
Timers: Check for consecutive invalid timers
1 parent fe1c6f5 commit ced33e2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

VCMP-LUA/vcmpWrap/Timer/TimerManager.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,12 @@ void TimerManager::OnFrame(float elapsedTime)
1414
{
1515
const int64_t currentTick = GetCurrentSysTime();
1616

17-
if (!timer->bIsValid)
17+
while (!timer->bIsValid)
1818
{
1919
timer = m_vcmpTimers.erase(timer);
2020
if (timer == m_vcmpTimers.end())
21-
break;
21+
return;
22+
break;
2223
}
2324

2425
int64_t lastTick = timer->getLastTick();

0 commit comments

Comments
 (0)