file filter: Be save against NULL
g_content_type_from_mime_type may return NULL, deal with that. https://bugzilla.gnome.org/show_bug.cgi?id=782180
This commit is contained in:
parent
7c66c68f48
commit
0f929fb6e3
@ -680,7 +680,9 @@ gtk_file_filter_filter (GtkFileFilter *filter,
|
||||
|
||||
filter_content_type = g_content_type_from_mime_type (filter_info->mime_type);
|
||||
rule_content_type = g_content_type_from_mime_type (rule->u.mime_type);
|
||||
match = g_content_type_is_a (filter_content_type, rule_content_type);
|
||||
match = filter_content_type != NULL &&
|
||||
rule_content_type != NULL &&
|
||||
g_content_type_is_a (filter_content_type, rule_content_type);
|
||||
g_free (filter_content_type);
|
||||
g_free (rule_content_type);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user