mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-11 15:40:53 +00:00
tests: check for NULL before strcmp
This commit is contained in:
@ -128,7 +128,10 @@ filter_keyword_cb (GObject *object,
|
|||||||
const gchar *haystack = sysprof_process_model_item_get_command_line (item);
|
const gchar *haystack = sysprof_process_model_item_get_command_line (item);
|
||||||
const gchar *needle = user_data;
|
const gchar *needle = user_data;
|
||||||
|
|
||||||
return strstr (haystack, needle) != NULL;
|
if (haystack && needle)
|
||||||
|
return strstr (haystack, needle) != NULL;
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|||||||
Reference in New Issue
Block a user