Commit 977def8f authored by Matthias Clasen's avatar Matthias Clasen

Merge branch 'recent-handle-null-content-type' into 'gtk-3-24'

gtkrecentfilter: handle g_content_type_from_mime_type() returning NULL

See merge request GNOME/gtk!969
parents 041b64b9 8a53ed9e
......@@ -746,11 +746,12 @@ gtk_recent_filter_filter (GtkRecentFilter *filter,
if (filter_info->mime_type != NULL)
gchar *filter_content_type, *rule_content_type;
gboolean match;
gboolean match = FALSE;
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);
if (filter_content_type != NULL && rule_content_type != NULL)
match = g_content_type_is_a (filter_content_type, rule_content_type);
g_free (filter_content_type);
g_free (rule_content_type);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment