From b685bfc7808c9c939b38fdd23e48e8f86a050960 Mon Sep 17 00:00:00 2001 From: Akash Mozumdar Date: Mon, 30 Sep 2019 08:51:34 -0400 Subject: [PATCH] nope, can't order it that way --- texthook/texthook.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/texthook/texthook.cc b/texthook/texthook.cc index 584dfdd..5f8d10b 100644 --- a/texthook/texthook.cc +++ b/texthook/texthook.cc @@ -292,10 +292,10 @@ void TextHook::RemoveReadCode() void TextHook::Clear() { if (address == 0) return; - NotifyHookRemove(address, hp.name); - std::scoped_lock lock(viewMutex); if (hp.type & DIRECT_READ) RemoveReadCode(); else RemoveHookCode(); + NotifyHookRemove(address, hp.name); + std::scoped_lock lock(viewMutex); memset(&hp, 0, sizeof(HookParam)); address = 0; }