[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
This commit is contained in:
Daniel Silverstone 2006-03-10 01:42:21 +00:00
parent 4306d74faf
commit b58c92b030
1 changed files with 5 additions and 0 deletions

View File

@ -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,