Fixed FindWindowSettingsByID() being able to return a deleted setting.

This commit is contained in:
ocornut 2023-04-06 17:16:05 +02:00
parent 47a07d8476
commit 8738ed88f0

View File

@ -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;
}