mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-15 01:17:00 +00:00
Fix stupid crash on fallback glyph handling (ttf branch)
This commit is contained in:
parent
6c6d1746d4
commit
188165a063
@ -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…
Reference in New Issue
Block a user