File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -335,6 +335,7 @@ void MainThreadFunc() {
335
335
g_graphicsContext->Shutdown ();
336
336
337
337
delete g_graphicsContext;
338
+ g_graphicsContext = nullptr ;
338
339
339
340
RECT rc;
340
341
if (console && GetWindowRect (console, &rc) && !IsIconic (console)) {
Original file line number Diff line number Diff line change @@ -256,6 +256,19 @@ void D3D11Context::Shutdown() {
256
256
}
257
257
#endif
258
258
259
+ #ifdef _DEBUG
260
+ d3dDebug_ = nullptr ;
261
+ d3dInfoQueue_ = nullptr ;
262
+ #endif
263
+
264
+ // Important that we release before we unload the DLL, otherwise we may crash on shutdown.
265
+ bbRenderTargetTex_ = nullptr ;
266
+ bbRenderTargetView_ = nullptr ;
267
+ context1_ = nullptr ;
268
+ context_ = nullptr ;
269
+ device1_ = nullptr ;
270
+ device_ = nullptr ;
259
271
hWnd_ = nullptr ;
272
+
260
273
UnloadD3D11 ();
261
274
}
You can’t perform that action at this time.
0 commit comments