Avoid recursive call of this function when the icon file is not found.

2004-19-05  Muktha  <muktha.narayan@wipro.com>

       * mime-type-info.c (get_icon_pixbuf): Avoid recursive call of this
       function when the icon file is not found. Fixes file-types capplet
       hang. Bug #142894.
This commit is contained in:
Muktha 2004-05-27 09:35:24 +00:00 committed by Muktha Narayan
parent 9d1a12fee0
commit 0bcf4f2771
2 changed files with 10 additions and 1 deletions

View file

@ -1,3 +1,9 @@
2004-19-05 Muktha <muktha.narayan@wipro.com>
* mime-type-info.c (get_icon_pixbuf): Avoid recursive call of this
function when the icon file is not found. Fixes file-types capplet
hang. Bug #142894.
2003-06-10 Shailesh Mittal <shailesh.mittal@wipro.com> 2003-06-10 Shailesh Mittal <shailesh.mittal@wipro.com>
* libuuid/gen_uuid.c (get_node_id): Creating an IPv6 socket if AF_INET6 * libuuid/gen_uuid.c (get_node_id): Creating an IPv6 socket if AF_INET6

View file

@ -138,7 +138,7 @@ get_icon_pixbuf (MimeTypeInfo *info, const gchar *icon_path, gboolean want_large
info->icon_pixbuf = gdk_pixbuf_new_from_file (icon_path, NULL); info->icon_pixbuf = gdk_pixbuf_new_from_file (icon_path, NULL);
if (info->icon_pixbuf == NULL) { if (info->icon_pixbuf == NULL) {
get_icon_pixbuf (info, NULL, want_large); return;
} }
else if (!want_large) { else if (!want_large) {
info->small_icon_pixbuf = info->small_icon_pixbuf =
@ -231,6 +231,9 @@ mime_type_info_get_icon (MimeTypeInfo *info)
{ {
if (info->small_icon_pixbuf == NULL) if (info->small_icon_pixbuf == NULL)
get_icon_pixbuf (info, mime_type_info_get_icon_path (info), FALSE); get_icon_pixbuf (info, mime_type_info_get_icon_path (info), FALSE);
if (info->icon_pixbuf == NULL)
get_icon_pixbuf (info, NULL, FALSE);
if (info->small_icon_pixbuf != NULL) if (info->small_icon_pixbuf != NULL)
g_object_ref (G_OBJECT (info->small_icon_pixbuf)); g_object_ref (G_OBJECT (info->small_icon_pixbuf));
return info->small_icon_pixbuf; return info->small_icon_pixbuf;