Protect TextIsEqual from NULLs (#2121)
This commit is contained in:
parent
3f595fda26
commit
8ec5b2dc2f
1 changed files with 4 additions and 0 deletions
|
@ -1142,6 +1142,10 @@ bool TextIsEqual(const char *text1, const char *text2)
|
||||||
{
|
{
|
||||||
bool result = false;
|
bool result = false;
|
||||||
|
|
||||||
|
if (text1 == NULL || text2 == NULL) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (strcmp(text1, text2) == 0) result = true;
|
if (strcmp(text1, text2) == 0) result = true;
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue