From 7bd88cfb140d2e982ac86f3fa4a7c3215c50ae15 Mon Sep 17 00:00:00 2001 From: Luke Usher Date: Sat, 9 Nov 2019 22:55:44 +0000 Subject: [PATCH] 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 --- src/core/hle/D3D8/Direct3D9/Direct3D9.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/core/hle/D3D8/Direct3D9/Direct3D9.cpp b/src/core/hle/D3D8/Direct3D9/Direct3D9.cpp index ca6a0a456..3eb2f77ed 100644 --- a/src/core/hle/D3D8/Direct3D9/Direct3D9.cpp +++ b/src/core/hle/D3D8/Direct3D9/Direct3D9.cpp @@ -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) {