From fed822871286b8ae359799a54a6cef3ec24b5513 Mon Sep 17 00:00:00 2001 From: Pavol Marko Date: Sun, 12 Sep 2004 17:00:22 +0000 Subject: [PATCH] Fixed small bug where the behaviour of a CTask object would be undefined if a plugin delted the task when it executes --- amxmodx/CTask.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/amxmodx/CTask.cpp b/amxmodx/CTask.cpp index 20bff6e1..79abe7d4 100755 --- a/amxmodx/CTask.cpp +++ b/amxmodx/CTask.cpp @@ -122,6 +122,9 @@ void CTaskMngr::CTask::executeIfRequired(float fCurrentTime, float fTimeLimit, f executeForwards(m_iFunc, m_iId); } + if (isFree()) + return; + // set new exec time OR remove the task if needed if (m_bLoop || (--m_iRepeat > 0)) {