Skip to content

Commit

Permalink
Misc: made ErrorCheckEndWindowRecover() handle font stack. (#6431, #1651
Browse files Browse the repository at this point in the history
)
  • Loading branch information
ocornut committed May 15, 2023
1 parent bcfc1ad commit a550263
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions imgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9198,6 +9198,11 @@ void ImGui::ErrorCheckEndWindowRecover(ImGuiErrorLogCallback log_callback, vo
if (log_callback) log_callback(user_data, "Recovered from missing PopStyleVar() in '%s'", window->Name);
PopStyleVar();
}
while (g.FontStack.Size > stack_sizes->SizeOfFontStack) //-V1044
{
if (log_callback) log_callback(user_data, "Recovered from missing PopFont() in '%s'", window->Name);
PopFont();
}
while (g.FocusScopeStack.Size > stack_sizes->SizeOfFocusScopeStack + 1) //-V1044
{
if (log_callback) log_callback(user_data, "Recovered from missing PopFocusScope() in '%s'", window->Name);
Expand Down

0 comments on commit a550263

Please sign in to comment.