From 117e2d77e4be4e3d14347d1f2b2ef4e000cf4e49 Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Wed, 8 Jan 2025 20:56:06 +0100 Subject: [PATCH] ImguiSystem: purge the surface list on shutdown Move purging logic to shutdown. --- src/gameui/imgui_system.cpp | 2 ++ src/windows/id3dx.cpp | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/gameui/imgui_system.cpp b/src/gameui/imgui_system.cpp index ad540297..928715ff 100644 --- a/src/gameui/imgui_system.cpp +++ b/src/gameui/imgui_system.cpp @@ -91,6 +91,8 @@ void CImguiSystem::Shutdown() m_initialized = false; m_hasNewFrame = false; + + m_surfaceList.Purge(); } //----------------------------------------------------------------------------- diff --git a/src/windows/id3dx.cpp b/src/windows/id3dx.cpp index 00c4c4c8..8440ddbf 100644 --- a/src/windows/id3dx.cpp +++ b/src/windows/id3dx.cpp @@ -362,9 +362,6 @@ void DirectX_Shutdown() if (ImguiSystem()->IsInitialized()) { ImguiSystem()->Shutdown(); - - ImguiSystem()->RemoveSurface(&g_Browser); - ImguiSystem()->RemoveSurface(&g_Console); } }