fixed sefault when calling the function with null pointer
This commit is contained in:
parent
1639d091db
commit
dc86f5e04a
|
|
@ -1424,7 +1424,7 @@ int TextCopy(char *dst, const char *src)
|
|||
// REQUIRES: strcmp()
|
||||
bool TextIsEqual(const char *text1, const char *text2)
|
||||
{
|
||||
return !strcmp(text1, text2);
|
||||
return text1 && text2 ? !strcmp(text1, text2) : 0;
|
||||
}
|
||||
|
||||
// Get a piece of a text string
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user