From 6e87f071b8642456b1c29210b02a75d4c10de8b7 Mon Sep 17 00:00:00 2001 From: ocornut Date: Tue, 20 Sep 2016 12:41:21 +0200 Subject: [PATCH] Shutdown() clear out some remaining pointers (#836) --- imgui.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/imgui.cpp b/imgui.cpp index bdd08a30b..ed0c13d6b 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -2335,10 +2335,13 @@ void ImGui::Shutdown() } g.Windows.clear(); g.WindowsSortBuffer.clear(); + g.CurrentWindow = NULL; g.CurrentWindowStack.clear(); g.FocusedWindow = NULL; g.HoveredWindow = NULL; g.HoveredRootWindow = NULL; + g.ActiveIdWindow = NULL; + g.MovedWindow = NULL; for (int i = 0; i < g.Settings.Size; i++) ImGui::MemFree(g.Settings[i].Name); g.Settings.clear(); @@ -2347,6 +2350,8 @@ void ImGui::Shutdown() g.FontStack.clear(); g.OpenPopupStack.clear(); g.CurrentPopupStack.clear(); + g.SetNextWindowSizeConstraintCallback = NULL; + g.SetNextWindowSizeConstraintCallbackUserData = NULL; for (int i = 0; i < IM_ARRAYSIZE(g.RenderDrawLists); i++) g.RenderDrawLists[i].clear(); g.OverlayDrawList.ClearFreeMemory();