Mercurial > geeqie.yaz
diff src/pixbuf_util.c @ 1345:6fb0c1829b76
Prevent Gtk assertion failures when no icon is set.
author | zas_ |
---|---|
date | Sat, 28 Feb 2009 20:24:42 +0000 |
parents | 63eb48237608 |
children | 9e7aed6ba6bd |
line wrap: on
line diff
--- a/src/pixbuf_util.c Sat Feb 28 20:13:11 2009 +0000 +++ b/src/pixbuf_util.c Sat Feb 28 20:24:42 2009 +0000 @@ -166,15 +166,18 @@ GError *error = NULL; icon_theme = gtk_icon_theme_get_default(); - pixbuf = gtk_icon_theme_load_icon (icon_theme, + pixbuf = gtk_icon_theme_load_icon(icon_theme, icon, /* icon name */ 64, /* size */ 0, /* flags */ &error); if (!pixbuf) { - DEBUG_1("Couldn't load icon: %s", error->message); - g_error_free(error); + if (error) + { + DEBUG_1("Couldn't load icon: %s", error->message); + g_error_free(error); + } return FALSE; }