Fixed memory leak

This commit is contained in:
Nemirtingas 2019-08-25 21:22:25 +02:00
parent 42a22dd4bb
commit cd8c5fc2ea
7 changed files with 20 additions and 11 deletions

View file

@ -14,6 +14,7 @@ DX9_Hook* DX9_Hook::_inst = nullptr;
bool DX9_Hook::start_hook()
{
bool res = true;
if (!_hooked)
{
if (!Windows_Hook::Inst().start_hook())
@ -60,13 +61,13 @@ bool DX9_Hook::start_hook()
else
{
PRINT_DEBUG("Failed to DirectX 9\n");
return false;
res = false;
}
if(pDeviceEx)pDeviceEx->Release();
if(pD3D)pD3D->Release();
}
return true;
return res;
}
void DX9_Hook::resetRenderState()