diff --git a/src/rtext.c b/src/rtext.c index 1c70aedc1..9c627559c 100644 --- a/src/rtext.c +++ b/src/rtext.c @@ -1452,6 +1452,10 @@ Rectangle GetGlyphAtlasRec(Font font, int codepoint) // NOTE: Returned lines end with null terminator '\0' char **LoadTextLines(const char *text, int *count) { + char **lines = NULL; + + if (text == NULL) { *count = 0; return lines; } + int lineCount = 1; int textSize = (int)strlen(text);