2
0
Эх сурвалжийг харах

Fix stupid crash on fallback glyph handling (ttf branch)

ocornut 10 жил өмнө
parent
commit
188165a063
1 өөрчлөгдсөн 2 нэмэгдсэн , 1 устгасан
  1. 2 1
      imgui.cpp

+ 2 - 1
imgui.cpp

@@ -6550,7 +6550,8 @@ const ImFont::Glyph* ImFont::FindGlyph(unsigned short c) const
     if (c < (int)IndexLookup.size())
     {
         const int i = IndexLookup[c];
-        return &Glyphs[i];
+        if (i != -1)
+            return &Glyphs[i];
     }
     return FallbackGlyph;
 }