From 33af42360f4609e30efaf72b241dfaae8998db07 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Fri, 7 Oct 2011 19:39:52 +0000 Subject: fix ico handler to actually decode to bitmap when called via get_internal svn path=/trunk/netsurf/; revision=12980 --- gtk/scaffolding.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'gtk/scaffolding.c') 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)); } -- cgit v1.2.3