Skip to content

Commit

Permalink
Fixed FindWindowSettingsByID() being able to return a deleted setting.
Browse files Browse the repository at this point in the history
  • Loading branch information
ocornut committed Apr 6, 2023
1 parent 47a07d8 commit 8738ed8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion imgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

1 comment on commit 8738ed8

@kilitary
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

###

Please sign in to comment.