Skip to content

Commit

Permalink
Bug 555779 – GtkCellRendererPixbuf crashed on failed GIcon lookup
Browse files Browse the repository at this point in the history
2008-10-13  Matthias Clasen  <[email protected]>

        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=/trunk/; revision=21650
  • Loading branch information
Matthias Clasen authored and Matthias Clasen committed Oct 14, 2008
1 parent 784896a commit 2377e48
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
9 changes: 9 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
2008-10-13 Matthias Clasen <[email protected]>

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 <[email protected]>

Bug 552318 – menubar mnemonics consumed even when
Expand Down
12 changes: 10 additions & 2 deletions gtk/gtkcellrendererpixbuf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 2377e48

Please sign in to comment.