diff options
author | Vincent Sanders <vince@netsurf-browser.org> | 2011-10-07 19:39:52 +0000 |
---|---|---|
committer | Vincent Sanders <vince@netsurf-browser.org> | 2011-10-07 19:39:52 +0000 |
commit | 33af42360f4609e30efaf72b241dfaae8998db07 (patch) | |
tree | 14b3225d68e007d38db3e27cc314f8f39661e2b1 /gtk/scaffolding.c | |
parent | c22373e000fa545b2db23b6988c718e3acd95520 (diff) | |
download | netsurf-33af42360f4609e30efaf72b241dfaae8998db07.tar.gz netsurf-33af42360f4609e30efaf72b241dfaae8998db07.tar.bz2 |
fix ico handler to actually decode to bitmap when called via get_internal
svn path=/trunk/netsurf/; revision=12980
Diffstat (limited to 'gtk/scaffolding.c')
-rw-r--r-- | gtk/scaffolding.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gtk/scaffolding.c b/gtk/scaffolding.c index b9a4b0909..a602cd54f 100644 --- a/gtk/scaffolding.c +++ b/gtk/scaffolding.c @@ -2006,8 +2006,10 @@ void gui_window_set_icon(struct gui_window *_g, hlcache_handle *icon) if (icon_bitmap != NULL) { GdkPixbuf *pb = gtk_bitmap_get_primary(icon_bitmap); - if (pb != NULL && gdk_pixbuf_get_width(pb) > 0 && - gdk_pixbuf_get_height(pb) > 0) { + + if ((pb != NULL) && + (gdk_pixbuf_get_width(pb) > 0) && + (gdk_pixbuf_get_height(pb) > 0)) { pb = gdk_pixbuf_scale_simple(pb, 16, 16, GDK_INTERP_HYPER); iconImage = GTK_IMAGE(gtk_image_new_from_pixbuf(pb)); } |