diff --git a/XUtils.c b/XUtils.c index 9e2d6bf1a..1eed7772f 100644 --- a/XUtils.c +++ b/XUtils.c @@ -107,6 +107,9 @@ void* xReallocArrayZero(void* ptr, size_t prevmemb, size_t newmemb, size_t size) } inline bool String_contains_i(const char* s1, const char* s2, bool multi) { + if (!s1 || !s2) + return false; + // we have a multi-string search term, handle as special case for performance reasons if (multi && strchr(s2, '|')) { size_t nNeedles;