diff --git a/src/rtext.c b/src/rtext.c index aba276aa2..fc78b6932 100644 --- a/src/rtext.c +++ b/src/rtext.c @@ -1345,7 +1345,7 @@ Rectangle GetGlyphAtlasRec(Font font, int codepoint) unsigned int TextLength(const char *text) { // use strlen since it uses vector operations - return strlen(text); + return text ? strlen(text) : 0; } // Formatting of text with variables to 'embed'