diff --git a/src/rtext.c b/src/rtext.c index 52938e3d2..009aba044 100644 --- a/src/rtext.c +++ b/src/rtext.c @@ -1891,6 +1891,7 @@ void TextAppend(char *text, const char *append, int *position) int TextFindIndex(const char *text, const char *search) { int position = -1; + if (text == NULL) return position; char *ptr = (char *)strstr(text, search);