diff --git a/src/text.c b/src/text.c index f8300d616..074fcdb2b 100644 --- a/src/text.c +++ b/src/text.c @@ -1147,7 +1147,10 @@ unsigned int TextLength(const char *text) { unsigned int length = 0; //strlen(text) - while (*text++) length++; + if (text != NULL) + { + while (*text++) length++; + } return length; }