Skip to content

Commit

Permalink
Protect TextIsEqual from NULLs (#2121)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukekras committed Nov 9, 2021
1 parent 3f595fd commit 8ec5b2d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/rtext.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 8ec5b2d

Please sign in to comment.