Return in case we do not have any available JS timer slots instead of accessing OOB memory.
This was SVN commit r17263.
This commit is contained in:
parent
f1f0fa1f8f
commit
6b8dc7684a
@ -904,7 +904,10 @@ void StartJsTimer(ScriptInterface::CxPrivate* pCxPrivate, unsigned int slot)
|
||||
ONCE(InitJsTimers(*(pCxPrivate->pScriptInterface)));
|
||||
|
||||
if (slot >= MAX_JS_TIMERS)
|
||||
{
|
||||
LOGERROR("Exceeded the maximum number of timer slots for scripts!");
|
||||
return;
|
||||
}
|
||||
|
||||
js_start_times[slot].SetFromTimer();
|
||||
}
|
||||
@ -912,7 +915,10 @@ void StartJsTimer(ScriptInterface::CxPrivate* pCxPrivate, unsigned int slot)
|
||||
void StopJsTimer(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), unsigned int slot)
|
||||
{
|
||||
if (slot >= MAX_JS_TIMERS)
|
||||
{
|
||||
LOGERROR("Exceeded the maximum number of timer slots for scripts!");
|
||||
return;
|
||||
}
|
||||
|
||||
TimerUnit now;
|
||||
now.SetFromTimer();
|
||||
|
Loading…
Reference in New Issue
Block a user