[examples] text_font_sdf - Corrected bug

This commit is contained in:
raysan5 2020-06-02 23:07:11 +02:00
parent 8a501ef06d
commit b00ab118c6
2 changed files with 7 additions and 1 deletions

View file

@ -622,6 +622,12 @@ Image GenImageFontAtlas(const CharInfo *chars, Rectangle **charRecs, int charsCo
{
Image atlas = { 0 };
if (chars == NULL)
{
TraceLog(LOG_WARNING, "FONT: Provided chars info not valid, returning empty image atlas");
return atlas;
}
*charRecs = NULL;
// In case no chars count provided we suppose default of 95