From 663906c60eb2f8da303f351da3913172d1def0c3 Mon Sep 17 00:00:00 2001 From: Scott Ehlert Date: Mon, 14 May 2007 06:45:27 +0000 Subject: [PATCH] Fixed amb289 - Crash on SourceMod shutdown when hooking events as post in Linux. --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40798 --- core/EventManager.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/core/EventManager.cpp b/core/EventManager.cpp index b0c08460f..9678f4748 100644 --- a/core/EventManager.cpp +++ b/core/EventManager.cpp @@ -345,7 +345,7 @@ bool EventManager::OnFireEvent(IGameEvent *pEvent, bool bDontBroadcast) if (pForward) { - EventInfo info = {pEvent, false}; + EventInfo info = { pEvent, NULL }; Handle_t hndl = g_HandleSys.CreateHandle(m_EventType, &info, NULL, g_pCoreIdent, NULL); pForward->PushCell(hndl); @@ -389,11 +389,10 @@ bool EventManager::OnFireEvent_Post(IGameEvent *pEvent, bool bDontBroadcast) if (pForward) { + EventInfo info = { pHook->pEventCopy, NULL }; + if (pHook->postCopy) { - pEventCopy = pHook->pEventCopy; - - EventInfo info = {pEventCopy, false}; hndl = g_HandleSys.CreateHandle(m_EventType, &info, NULL, g_pCoreIdent, NULL); pForward->PushCell(hndl);