nope, can't order it that way

This commit is contained in:
Akash Mozumdar 2019-09-30 08:51:34 -04:00
parent 8b345a4377
commit b685bfc780

View File

@ -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;
}