Fix stupid crash on fallback glyph handling (ttf branch)

docking
ocornut 10 years ago
parent 6c6d1746d4
commit 188165a063

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

Loading…
Cancel
Save