summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/text.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/text.c b/src/text.c
index f8300d61..074fcdb2 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;
}