From 8ec5b2dc2f73036bf8175e14c638f8f5d8718b9d Mon Sep 17 00:00:00 2001 From: Luke Krasnoff Date: Tue, 9 Nov 2021 21:07:55 +1030 Subject: [PATCH] Protect TextIsEqual from NULLs (#2121) --- src/rtext.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/rtext.c b/src/rtext.c index 1e4ed6176..b49a6fef0 100644 --- a/src/rtext.c +++ b/src/rtext.c @@ -1142,6 +1142,10 @@ bool TextIsEqual(const char *text1, const char *text2) { bool result = false; + if (text1 == NULL || text2 == NULL) { + return false; + } + if (strcmp(text1, text2) == 0) result = true; return result;