diff options
-rw-r--r-- | src/intel/compiler/brw_eu_validate.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/intel/compiler/brw_eu_validate.c b/src/intel/compiler/brw_eu_validate.c index 9f72c650ddb..f359599c38d 100644 --- a/src/intel/compiler/brw_eu_validate.c +++ b/src/intel/compiler/brw_eu_validate.c @@ -47,7 +47,8 @@ cat(struct string *dest, const struct string src) static bool contains(const struct string haystack, const struct string needle) { - return memmem(haystack.str, haystack.len, needle.str, needle.len) != NULL; + return haystack.str && memmem(haystack.str, haystack.len, + needle.str, needle.len) != NULL; } #define CONTAINS(haystack, needle) \ contains(haystack, (struct string){needle, strlen(needle)}) |