Overlays: check return value of stbtt_InitFont

This commit is contained in:
Megamouse 2025-11-16 12:28:08 +01:00
parent 6731feb751
commit 5267c87ca7

View file

@ -185,9 +185,10 @@ namespace rsx
// Check if the character exists in the font
stbtt_fontinfo info;
stbtt_InitFont(&info, bytes.data(), stbtt_GetFontOffsetForIndex(bytes.data(), 0));
font_found = stbtt_FindGlyphIndex(&info, c) != 0;
if (stbtt_InitFont(&info, bytes.data(), stbtt_GetFontOffsetForIndex(bytes.data(), 0)) != 0)
{
font_found = stbtt_FindGlyphIndex(&info, c) != 0;
}
if (!font_found)
{