#39 Segmentation fault when handle nonexistent icon

Unstable (example)
closed-accepted
nobody
bug fix (11)
5
2009-06-05
2008-10-01
No

this bug appears in stable release and in svn vesion of fbpanel

patch fixing this issue (for svn trunk):

--- panel/misc.c.orig 2008-08-12 00:58:12.000000000 +0300
+++ panel/misc.c 2008-09-30 19:33:25.000000000 +0300
@@ -975,12 +975,15 @@
icon_info = gtk_icon_theme_lookup_icon(gtk_icon_theme_get_default(),
iname, MAX(width, height), 0);
if (icon_info) {
+
+ const gchar *icon_file = gtk_icon_info_get_filename(icon_info);

DBG("iname = %s file = %s size = %d\n", iname,
- gtk_icon_info_get_filename(icon_info),
+ icon_file,
MAX(width, height));
- pb = gdk_pixbuf_new_from_file_at_size(gtk_icon_info_get_filename(icon_info),
- width, height, NULL);
+ if (icon_file)
+ pb = gdk_pixbuf_new_from_file_at_size(icon_file,
+ width, height, NULL);

gtk_icon_info_free(icon_info);
} else

Discussion

    • status: open --> closed-accepted