Sfoglia il codice sorgente

Fonts: fixed PopFont() broken recovery.

"misc_recover_1" test would assert in EndFrame()
ocornut 1 mese fa
parent
commit
573f08135d
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      imgui.cpp

+ 1 - 1
imgui.cpp

@@ -8812,7 +8812,7 @@ void ImGui::PushFont(ImFont* font, float font_size_base)
 void  ImGui::PopFont()
 {
     ImGuiContext& g = *GImGui;
-    if (g.FontStack.Size <= 0 && g.WithinFrameScope)
+    if (g.FontStack.Size <= 0)
     {
         IM_ASSERT_USER_ERROR(0, "Calling PopFont() too many times!");
         return;