From 39f4c3e1147ff0a41676b5c8a69f0af31ce592bb Mon Sep 17 00:00:00 2001 From: Luke Street Date: Sun, 30 May 2021 16:59:19 -0400 Subject: [PATCH] Fix shutdown ordering issues --- Runtime/CMain.cpp | 2 ++ imgui/ImGuiEngine.cpp | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/Runtime/CMain.cpp b/Runtime/CMain.cpp index 48700214c..68cd1cab1 100644 --- a/Runtime/CMain.cpp +++ b/Runtime/CMain.cpp @@ -307,6 +307,8 @@ public: g_mainMP1->Shutdown(); } g_mainMP1.reset(); + m_renderTex.reset(); + m_pipelineConv.reset(); if (m_window) { m_window->getCommandQueue()->stopRenderer(); } diff --git a/imgui/ImGuiEngine.cpp b/imgui/ImGuiEngine.cpp index c3beff7cd..5ac9419fa 100644 --- a/imgui/ImGuiEngine.cpp +++ b/imgui/ImGuiEngine.cpp @@ -143,6 +143,12 @@ void ImGuiEngine::Shutdown() { for (auto& item : ShaderDataBindings) { item.reset(); } + for (auto& item : Textures) { + item.reset(); + } + VertexBuffer.reset(); + IndexBuffer.reset(); + UniformBuffer.reset(); ShaderPipeline.reset(); }