fixed case where it could segfault

This commit is contained in:
DissolveDZ 2023-09-30 18:35:47 +02:00
parent 63cc7c671d
commit 1639d091db

View File

@ -1345,7 +1345,7 @@ Rectangle GetGlyphAtlasRec(Font font, int codepoint)
unsigned int TextLength(const char *text) unsigned int TextLength(const char *text)
{ {
// use strlen since it uses vector operations // use strlen since it uses vector operations
return strlen(text); return text ? strlen(text) : 0;
} }
// Formatting of text with variables to 'embed' // Formatting of text with variables to 'embed'