diff --git a/src/hooks.cpp b/src/hooks.cpp index 1ae0eae0..6ee8013f 100644 --- a/src/hooks.cpp +++ b/src/hooks.cpp @@ -48,7 +48,8 @@ void VMTHook::Set(ptr_t inst, uint32_t offset) { } void VMTHook::Release() { - if (vtable_ptr) { + if (vtable_ptr && *vtable_ptr == &vtable_hooked[2]) { + logging::Info("Un-hooking 0x%08x (vtable @ 0x%08x)", vtable_ptr, *vtable_ptr); if ((*vtable_ptr)[-1] == (method_t)GUARD) { *vtable_ptr = vtable_original; }