summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2008-10-14 03:49:18 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2008-10-14 03:49:18 +0000
commit742abd9630151c795de462f26070f8d6213cb6cd (patch)
treeb00b18b6ba8e7b345ab599fcc8042a5b5fa1f835
parent4806c17f25d9e29fef1958125fd9311ecb830c99 (diff)
downloadgdk-pixbuf-742abd9630151c795de462f26070f8d6213cb6cd.tar.gz
Bug 555779 – GtkCellRendererPixbuf crashed on failed GIcon lookup
2008-10-13 Matthias Clasen <mclasen@redhat.com> Bug 555779 – GtkCellRendererPixbuf crashed on failed GIcon lookup * gtk/gtkcellrendererpixbuf (gtk_cell_renderer_pixbuf_create_themed_pixbuf): Don't crash if a GIcon is not present in the current theme. Patch by Alex Larsson. svn path=/branches/gtk-2-14/; revision=21651
-rw-r--r--ChangeLog13
-rw-r--r--gtk/gtkcellrendererpixbuf.c12
2 files changed, 22 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index a95208406..a502cee57 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,17 @@
2008-10-13 Matthias Clasen <mclasen@redhat.com>
- Merged to trunk:
+ Merged from trunk:
+
+ Bug 555779 – GtkCellRendererPixbuf crashed on failed GIcon lookup
+
+ * gtk/gtkcellrendererpixbuf
+ (gtk_cell_renderer_pixbuf_create_themed_pixbuf): Don't crash
+ if a GIcon is not present in the current theme. Patch by
+ Alex Larsson.
+
+2008-10-13 Matthias Clasen <mclasen@redhat.com>
+
+ Merged from trunk:
Bug 552318 – menubar mnemonics consumed even when
gtk-enable-mnemonics=false
diff --git a/gtk/gtkcellrendererpixbuf.c b/gtk/gtkcellrendererpixbuf.c
index 87a73d673..a75a88f05 100644
--- a/gtk/gtkcellrendererpixbuf.c
+++ b/gtk/gtkcellrendererpixbuf.c
@@ -454,8 +454,16 @@ gtk_cell_renderer_pixbuf_create_themed_pixbuf (GtkCellRendererPixbuf *cellpixbuf
priv->gicon,
MIN (width, height),
GTK_ICON_LOOKUP_USE_BUILTIN);
- cellpixbuf->pixbuf = gtk_icon_info_load_icon (info, &error);
- gtk_icon_info_free (info);
+ if (!info)
+ {
+ g_set_error (&error, GTK_ICON_THEME_ERROR, GTK_ICON_THEME_NOT_FOUND,
+ _("Icon not present in theme"));
+ }
+ else
+ {
+ cellpixbuf->pixbuf = gtk_icon_info_load_icon (info, &error);
+ gtk_icon_info_free (info);
+ }
}
if (!cellpixbuf->pixbuf)