From 1639d091db57a7bdb481cd30937045253d2c0665 Mon Sep 17 00:00:00 2001 From: DissolveDZ Date: Sat, 30 Sep 2023 18:35:47 +0200 Subject: [PATCH] fixed case where it could segfault --- src/rtext.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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'