Fix a crash caused by double-free of g_pD3DDevice

This was only a problem for release builds, as the code for this was
disabled in Debug builds.

This fixes the crash when booting halo: It was unrelated to the (now
disabled) callbacks
This commit is contained in:
Luke Usher 2019-11-09 22:55:44 +00:00
parent d0655335d3
commit 7bd88cfb14
1 changed files with 1 additions and 8 deletions

View File

@ -1957,14 +1957,7 @@ static DWORD WINAPI EmuCreateDeviceProxy(LPVOID)
// TODO: ensure all other resources are cleaned up too
g_EmuCDPD.hRet = g_pD3DDevice->Release();
// Address DirectX Debug Runtime reported error in _DEBUG builds
// Direct3D8: (ERROR) :Not all objects were freed: the following indicate the types of unfreed objects.
#ifndef _DEBUG
while(g_pD3DDevice->Release() != 0);
#endif
g_pD3DDevice = nullptr;
g_pD3DDevice = nullptr;
// cleanup overlay clipper
if (g_pDDClipper != nullptr) {