From 8738ed88f081183436261cde35a6cdd2fefd5c0b Mon Sep 17 00:00:00 2001 From: ocornut Date: Thu, 6 Apr 2023 17:16:05 +0200 Subject: [PATCH] Fixed FindWindowSettingsByID() being able to return a deleted setting. --- imgui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imgui.cpp b/imgui.cpp index 4e3b6050d..02c5dd8e9 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -12840,7 +12840,7 @@ ImGuiWindowSettings* ImGui::FindWindowSettingsByID(ImGuiID id) { ImGuiContext& g = *GImGui; for (ImGuiWindowSettings* settings = g.SettingsWindows.begin(); settings != NULL; settings = g.SettingsWindows.next_chunk(settings)) - if (settings->ID == id) + if (settings->ID == id && !settings->WantDelete) return settings; return NULL; }