Skip to content

Commit

Permalink
Fix stupid crash on fallback glyph handling (ttf branch)
Browse files Browse the repository at this point in the history
  • Loading branch information
ocornut committed Jan 14, 2015
1 parent 6c6d174 commit 188165a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion imgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 188165a

Please sign in to comment.