summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Bursa <james@netsurf-browser.org>2005-04-30 17:11:24 +0000
committerJames Bursa <james@netsurf-browser.org>2005-04-30 17:11:24 +0000
commit03810e4b6c62164f2d3080bcb5851109dedb1884 (patch)
treef690b6eb5cba694246aa67a576a692626ef98bce
parente22f12e223910c151f645b60daff5d2546db85a3 (diff)
downloadnetsurf-03810e4b6c62164f2d3080bcb5851109dedb1884.tar.gz
netsurf-03810e4b6c62164f2d3080bcb5851109dedb1884.tar.bz2
[project @ 2005-04-30 17:11:24 by bursa]
Check box->background before using box->background->bitmap. svn path=/import/netsurf/; revision=1706
-rw-r--r--render/html_redraw.c9
1 files 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,