Skip to content

Commit 8ec5b2d

Browse files
authored
Protect TextIsEqual from NULLs (#2121)
1 parent 3f595fd commit 8ec5b2d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/rtext.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1142,6 +1142,10 @@ bool TextIsEqual(const char *text1, const char *text2)
11421142
{
11431143
bool result = false;
11441144

1145+
if (text1 == NULL || text2 == NULL) {
1146+
return false;
1147+
}
1148+
11451149
if (strcmp(text1, text2) == 0) result = true;
11461150

11471151
return result;

0 commit comments

Comments
 (0)