Misc: made ErrorCheckEndWindowRecover() handle font stack. (#6431, #1651)

This commit is contained in:
ocornut 2023-05-15 11:15:13 +02:00
parent bcfc1ad8f6
commit a550263d6c

View File

@ -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); if (log_callback) log_callback(user_data, "Recovered from missing PopStyleVar() in '%s'", window->Name);
PopStyleVar(); 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 while (g.FocusScopeStack.Size > stack_sizes->SizeOfFocusScopeStack + 1) //-V1044
{ {
if (log_callback) log_callback(user_data, "Recovered from missing PopFocusScope() in '%s'", window->Name); if (log_callback) log_callback(user_data, "Recovered from missing PopFocusScope() in '%s'", window->Name);