Fix calling timer callback in paused plugins

Don't try to call the timer callback, if it's not runnable.
Error wasn't reported before the exception refactoring.
This commit is contained in:
Peace-Maker 2015-08-09 01:50:36 +02:00
parent 17c4649651
commit 0a14d3f50c

View File

@ -133,7 +133,10 @@ ResultType TimerNatives::OnTimer(ITimer *pTimer, void *pData)
{
TimerInfo *pInfo = reinterpret_cast<TimerInfo *>(pData);
IPluginFunction *pFunc = pInfo->Hook;
cell_t res = static_cast<ResultType>(Pl_Continue);
if (!pFunc->IsRunnable())
return Pl_Continue;
cell_t res = static_cast<cell_t>(Pl_Continue);
pFunc->PushCell(pInfo->TimerHandle);
pFunc->PushCell(pInfo->UserData);