Fix a Windows64 crash when unloading a plugin that DHooked something

This commit is contained in:
rtldg 2025-02-28 02:37:34 +00:00
parent d5e05fae59
commit 26df9bf040

View File

@ -88,10 +88,13 @@ CHook::~CHook()
m_Hook.disable();
}
// x64 will free these in the m_bridge/m_postCallback destructors.
#ifndef DYNAMICHOOKS_x86_64
if (m_pBridge) {
smutils->GetScriptingEngine()->FreePageMemory(m_pBridge);
smutils->GetScriptingEngine()->FreePageMemory(m_pNewRetAddr);
}
#endif
delete m_pRegisters;
delete m_pCallingConvention;