Browse Source

Fix stupid crash on fallback glyph handling (ttf branch)

pull/113/head
ocornut 10 years ago
parent
commit
188165a063
  1. 3
      imgui.cpp

3
imgui.cpp

@ -6550,7 +6550,8 @@ 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];
return &Glyphs[i]; if (i != -1)
return &Glyphs[i];
} }
return FallbackGlyph; return FallbackGlyph;
} }

Loading…
Cancel
Save