]> Pileus Git - ~andy/gtk/commit
entry: guard for != NULL before unreffing the pixbuf
authorCosimo Cecchi <cosimoc@gnome.org>
Sun, 8 Jul 2012 04:27:30 +0000 (00:27 -0400)
committerCosimo Cecchi <cosimoc@gnome.org>
Sun, 8 Jul 2012 04:34:33 +0000 (00:34 -0400)
commitf30eab099bdc4044738c6df77fa6088abc666961
tree38b38c919d78bb970d988980ea008acb9e022632
parent5dbf3a576aab1bd33e6e08121690afefad19e50f
entry: guard for != NULL before unreffing the pixbuf

In gtk_entry_get_icon_pixbuf() we unreference the pixbuf that
_gtk_icon_helper_ensure_pixbuf() gives us back, since the function
doesn't return a reference, and by doing so we're able to return the
reference owned by the cached icon helper.
Since the icon helper method can return NULL though, if no icon
properties have been set on it, guard for != NULL before unreffing the
pixbuf, as that would cause a critical warning.

https://bugzilla.gnome.org/show_bug.cgi?id=679537
gtk/gtkentry.c