diff --git a/r5dev/hooks.cpp b/r5dev/hooks.cpp index dcb47164..bcc3b1f6 100644 --- a/r5dev/hooks.cpp +++ b/r5dev/hooks.cpp @@ -119,6 +119,7 @@ void InstallHooks() void RemoveHooks() { + // Begin the detour transaction, to unhook the the process DetourTransactionBegin(); DetourUpdateThread(GetCurrentThread()); @@ -126,6 +127,7 @@ void RemoveHooks() DetourDetach((LPVOID*)&SQVM_Print, &Hook_SQVM_Print); DetourDetach((LPVOID*)&SQVM_LoadScript, &Hook_SQVM_LoadScript); + // Commit the transaction DetourTransactionCommit(); }