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:
		
							parent
							
								
									17c4649651
								
							
						
					
					
						commit
						0a14d3f50c
					
				@ -133,7 +133,10 @@ ResultType TimerNatives::OnTimer(ITimer *pTimer, void *pData)
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
	TimerInfo *pInfo = reinterpret_cast<TimerInfo *>(pData);
 | 
						TimerInfo *pInfo = reinterpret_cast<TimerInfo *>(pData);
 | 
				
			||||||
	IPluginFunction *pFunc = pInfo->Hook;
 | 
						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->TimerHandle);
 | 
				
			||||||
	pFunc->PushCell(pInfo->UserData);
 | 
						pFunc->PushCell(pInfo->UserData);
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user