From d506ce912eb7cb3977d1bbcaa54f55125a0dcb61 Mon Sep 17 00:00:00 2001 From: Drifter Date: Fri, 9 Dec 2016 08:22:09 -0500 Subject: [PATCH] Make sure hooks are entity hooks before removing. --- listeners.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/listeners.cpp b/listeners.cpp index 97b0f17..fecec95 100644 --- a/listeners.cpp +++ b/listeners.cpp @@ -75,7 +75,7 @@ void DHooksEntityListener::OnEntityDestroyed(CBaseEntity *pEntity) for(int i = g_pHooks.length() -1; i >= 0; i--) { DHooksManager *manager = g_pHooks.at(i); - if(manager->callback->entity == entity) + if(manager->callback->hookType == HookType_Entity && manager->callback->entity == entity) { if(g_pRemoveList.length() == 0) {