From 8a0965110f5ed20e7baee165c7f1405f052eb83c Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Sun, 5 Dec 2004 23:51:10 +0000 Subject: [project @ 2004-12-05 23:51:10 by jmb] Explicitly check for boxes with 0 area, as there's no point redrawing them svn path=/import/netsurf/; revision=1384 --- render/html_redraw.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'render') diff --git a/render/html_redraw.c b/render/html_redraw.c index 1e4a32def..20e9080aa 100644 --- a/render/html_redraw.c +++ b/render/html_redraw.c @@ -199,6 +199,10 @@ bool html_redraw_box(struct box *box, if (y0 < clip_y0) y0 = clip_y0; if (clip_x1 < x1) x1 = clip_x1; if (clip_y1 < y1) y1 = clip_y1; + /* no point trying to draw 0-width/height boxes */ + if (x0 == x1 || y0 == y1) + /* not an error, so return true */ + return true; /* clip to it */ if (!plot.clip(x0, y0, x1, y1)) return false; -- cgit v1.2.3