From b58c92b030ef3acca6e5af1445b3db338dbd942d Mon Sep 17 00:00:00 2001 From: Daniel Silverstone Date: Fri, 10 Mar 2006 01:42:21 +0000 Subject: [PATCH] [project @ 2006-03-10 01:42:21 by dsilvers] Make sure zero width/height images don't crash the gtk renderer svn path=/import/netsurf/; revision=2117 --- gtk/gtk_plotters.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gtk/gtk_plotters.c b/gtk/gtk_plotters.c index 6c40bb387..ca923bd0b 100644 --- a/gtk/gtk_plotters.c +++ b/gtk/gtk_plotters.c @@ -138,6 +138,11 @@ bool nsgtk_plot_bitmap(int x, int y, int width, int height, { GdkPixbuf *pixbuf = (GdkPixbuf *) bitmap; + LOG(("PLOT: %p @ %d,%d (%dx%d)\n", bitmap, x, y, width, height)); + + if (width == 0 || height == 0) + return true; + if (gdk_pixbuf_get_width(pixbuf) == width && gdk_pixbuf_get_height(pixbuf) == height) { gdk_draw_pixbuf(current_drawable, current_gc,