Commit 8a53ed9e authored by Christoph Reiter's avatar Christoph Reiter

gtkrecentfilter: handle g_content_type_from_mime_type() returning NULL

Otherwise we get errors on g_content_type_is_a(). This happens mostly on Windows
because it only knows a limited set of mime types and tries to convert
them to file extensions without any fallback.
parent 041b64b9
......@@ -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