diff options
| author | Luke Krasnoff <[email protected]> | 2021-11-09 21:07:55 +1030 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-11-09 11:37:55 +0100 |
| commit | 8ec5b2dc2f73036bf8175e14c638f8f5d8718b9d (patch) | |
| tree | ac8c896e2375b6e17d8d2d4b0a20cdf5c3e717f0 /src/rtext.c | |
| parent | 3f595fda2613cf2620c1d8ed31506a72905ff170 (diff) | |
| download | raylib-8ec5b2dc2f73036bf8175e14c638f8f5d8718b9d.tar.gz raylib-8ec5b2dc2f73036bf8175e14c638f8f5d8718b9d.zip | |
Protect TextIsEqual from NULLs (#2121)
Diffstat (limited to 'src/rtext.c')
| -rw-r--r-- | src/rtext.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/rtext.c b/src/rtext.c index 1e4ed617..b49a6fef 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; |
