From 5941edd9f7ca30226a4afb3c8c23431d405f4f2a Mon Sep 17 00:00:00 2001 From: ocornut Date: Fri, 22 Sep 2023 15:28:04 +0200 Subject: [PATCH] MultiSelect: added support for recovery in ErrorCheckEndWindowRecover(). --- imgui.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/imgui.cpp b/imgui.cpp index f932e4efa..ab9cc59b6 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -10068,6 +10068,11 @@ void ImGui::ErrorCheckEndWindowRecover(ImGuiErrorLogCallback log_callback, vo if (log_callback) log_callback(user_data, "Recovered from missing EndTabBar() in '%s'", window->Name); EndTabBar(); } + while (g.CurrentMultiSelect != NULL && g.CurrentMultiSelect->Storage->Window == window) + { + if (log_callback) log_callback(user_data, "Recovered from missing EndMultiSelect() in '%s'", window->Name); + EndMultiSelect(); + } while (window->DC.TreeDepth > 0) { if (log_callback) log_callback(user_data, "Recovered from missing TreePop() in '%s'", window->Name);