From 03810e4b6c62164f2d3080bcb5851109dedb1884 Mon Sep 17 00:00:00 2001 From: James Bursa Date: Sat, 30 Apr 2005 17:11:24 +0000 Subject: [project @ 2005-04-30 17:11:24 by bursa] Check box->background before using box->background->bitmap. svn path=/import/netsurf/; revision=1706 --- render/html_redraw.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/render/html_redraw.c b/render/html_redraw.c index 10c0bb9e1..eb7a974a3 100644 --- a/render/html_redraw.c +++ b/render/html_redraw.c @@ -789,7 +789,7 @@ bool html_redraw_background(int x, int y, struct box *box, float scale, int px0 = clip_x0, py0 = clip_y0, px1 = clip_x1, py1 = clip_y1; int ox = x, oy = y; - if (box->background->bitmap) { + if (box->background && box->background->bitmap) { /* handle background-repeat */ switch (box->style->background_repeat) { case CSS_BACKGROUND_REPEAT_REPEAT: @@ -878,8 +878,9 @@ bool html_redraw_background(int x, int y, struct box *box, float scale, if ((clip_x0 >= clip_x1) || (clip_y0 >= clip_y1) || (clip_box->style->background_color != TRANSPARENT) || - ((clip_box->background->bitmap) && - (bitmap_get_opaque(clip_box->background->bitmap)))) { + (clip_box->background && + clip_box->background->bitmap && + bitmap_get_opaque(clip_box->background->bitmap))) { if (!(clip_box = clip_box->next)) return true; continue; @@ -895,7 +896,7 @@ bool html_redraw_background(int x, int y, struct box *box, float scale, return false; } /* and plot the image */ - if (box->background->bitmap) { + if (box->background && box->background->bitmap) { if (!plot.clip(clip_x0, clip_y0, clip_x1, clip_y1)) return false; if (!plot.bitmap_tile(x, y, -- cgit v1.2.3