diff options
author | Daniel Silverstone <dsilvers@netsurf-browser.org> | 2006-03-10 01:42:21 +0000 |
---|---|---|
committer | Daniel Silverstone <dsilvers@netsurf-browser.org> | 2006-03-10 01:42:21 +0000 |
commit | b58c92b030ef3acca6e5af1445b3db338dbd942d (patch) | |
tree | cc6d2fdfc66d4a25d46161aa00a6a69f1113ee90 /gtk/gtk_plotters.c | |
parent | 4306d74fafff062de2c6749bc369483394dae20e (diff) | |
download | netsurf-b58c92b030ef3acca6e5af1445b3db338dbd942d.tar.gz netsurf-b58c92b030ef3acca6e5af1445b3db338dbd942d.tar.bz2 |
[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
Diffstat (limited to 'gtk/gtk_plotters.c')
-rw-r--r-- | gtk/gtk_plotters.c | 5 |
1 files changed, 5 insertions, 0 deletions
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, |