win32: only deinit ogl imgui when ogl is initialized

This commit is contained in:
OV2 2023-05-08 19:06:14 +02:00
parent 5481bb0436
commit c7e6e9c211
1 changed files with 2 additions and 2 deletions

View File

@ -151,12 +151,12 @@ bool COpenGL::Initialize(HWND hWnd)
void COpenGL::DeInitialize()
{
initDone = false;
if (S9xImGuiRunning())
if (initDone && S9xImGuiRunning())
{
ImGui_ImplOpenGL3_Shutdown();
S9xImGuiDeinit();
}
initDone = false;
SetShaders(NULL);
DestroyDrawSurface();
wglMakeCurrent(NULL,NULL);