Commit b3bb8c47 authored by Carlos Garnacho's avatar Carlos Garnacho Committed by Carlos Garnacho

Fix two potential critical warnings. Bug #539470.

2008-06-27  Carlos Garnacho  <carlos@imendio.com>

        * gtk/gtkrecentmanager.c (get_icon_for_mime_type): Fix two potential
        critical warnings. Bug #539470.

svn path=/trunk/; revision=20696
parent e27632cd
2008-06-27 Carlos Garnacho <carlos@imendio.com>
* gtk/gtkrecentmanager.c (get_icon_for_mime_type): Fix two potential
critical warnings. Bug #539470.
2008-06-27 Emmanuele Bassi <ebassi@gnome.org>
Abstract some GdkWindow API into an interface that the backends
......
......@@ -1889,15 +1889,22 @@ get_icon_for_mime_type (const char *mime_type,
icon_theme = gtk_icon_theme_get_default ();
content_type = g_content_type_from_mime_type (mime_type);
if (!content_type)
return NULL;
icon = g_content_type_get_icon (content_type);
info = gtk_icon_theme_lookup_by_gicon (icon_theme,
icon,
pixel_size,
GTK_ICON_LOOKUP_USE_BUILTIN);
pixbuf = gtk_icon_info_load_icon (info, NULL);
g_free (content_type);
g_object_unref (icon);
if (!info)
return NULL;
pixbuf = gtk_icon_info_load_icon (info, NULL);
gtk_icon_info_free (info);
return pixbuf;
......
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