diff --git a/bundled_deps/imgui/imgui/imgui_draw.cpp b/bundled_deps/imgui/imgui/imgui_draw.cpp index 62a470233b..b28e1d39ff 100644 --- a/bundled_deps/imgui/imgui/imgui_draw.cpp +++ b/bundled_deps/imgui/imgui/imgui_draw.cpp @@ -3293,7 +3293,7 @@ const ImFontGlyph* ImFont::FindGlyph(ImWchar c) const } const ImWchar i = IndexLookup.Data[c]; if (i == (ImWchar)-1) { - imgui_rendered_fallback_glyph(c); + imgui_rendered_fallback_glyph(c); return FallbackGlyph; } return &Glyphs.Data[i]; diff --git a/src/slic3r/GUI/ImGuiWrapper.cpp b/src/slic3r/GUI/ImGuiWrapper.cpp index b82c396629..da5b778ed0 100644 --- a/src/slic3r/GUI/ImGuiWrapper.cpp +++ b/src/slic3r/GUI/ImGuiWrapper.cpp @@ -57,6 +57,9 @@ bool s_font_cjk; // a fallback glyph for c. void imgui_rendered_fallback_glyph(ImWchar c) { + if (c == 0) + return; + if (ImGui::GetIO().Fonts->Fonts[0] == ImGui::GetFont()) { // Only do this when we are using the default ImGui font. Otherwise this would conflict with // EmbossStyleManager's font handling and we would load glyphs needlessly.