tests: check for NULL before strcmp

This commit is contained in:
Christian Hergert
2019-05-20 12:26:03 -07:00
parent 9d7dc9cfeb
commit 6b412b0af5

View File

@ -128,7 +128,10 @@ filter_keyword_cb (GObject *object,
const gchar *haystack = sysprof_process_model_item_get_command_line (item);
const gchar *needle = user_data;
return strstr (haystack, needle) != NULL;
if (haystack && needle)
return strstr (haystack, needle) != NULL;
return FALSE;
}
static void