From cb8d92edebafafc7056e593fd5c96947dbcdab62 Mon Sep 17 00:00:00 2001 From: Kyle Sanderson Date: Sun, 28 Oct 2018 11:06:57 -0700 Subject: [PATCH] SDKHooks: Reset global hookid when unhooking in SH. (#916) Fixes https://github.com/alliedmodders/sourcemod/issues/912 --- extensions/sdkhooks/extension.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/extensions/sdkhooks/extension.cpp b/extensions/sdkhooks/extension.cpp index d36f82d8..d7f08e25 100644 --- a/extensions/sdkhooks/extension.cpp +++ b/extensions/sdkhooks/extension.cpp @@ -328,6 +328,7 @@ void SDKHooks::SDK_OnAllLoaded() if (hook != 0) \ { \ SH_REMOVE_HOOK_ID(hook); \ + hook = 0; \ } void SDKHooks::SDK_OnUnload()