summaryrefslogtreecommitdiff
path: root/framebuffer/fb_32bpp_plotters.c
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@netsurf-browser.org>2008-09-24 11:22:52 +0000
committerDaniel Silverstone <dsilvers@netsurf-browser.org>2008-09-24 11:22:52 +0000
commit29d1e44dec29a3c029b47634b5474f49e0e6d43b (patch)
tree945c62a61f11dc88d43809c9e9f00ca48ab744ae /framebuffer/fb_32bpp_plotters.c
parent9b76a47bbe36bd302a188072de935d3dbbbcb614 (diff)
downloadnetsurf-29d1e44dec29a3c029b47634b5474f49e0e6d43b.tar.gz
netsurf-29d1e44dec29a3c029b47634b5474f49e0e6d43b.tar.bz2
Fix line plotting and rectangle clipping segfault
svn path=/trunk/netsurf/; revision=5430
Diffstat (limited to 'framebuffer/fb_32bpp_plotters.c')
-rw-r--r--framebuffer/fb_32bpp_plotters.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/framebuffer/fb_32bpp_plotters.c b/framebuffer/fb_32bpp_plotters.c
index 24315d13e..3805ff753 100644
--- a/framebuffer/fb_32bpp_plotters.c
+++ b/framebuffer/fb_32bpp_plotters.c
@@ -60,7 +60,8 @@ static bool fb_32bpp_line(int x0, int y0, int x1, int y1, int width,
if (y0 == y1) {
/* horizontal line special cased */
- fb_plotters_clip_rect_ctx(&x0, &y0, &x1, &y1);
+ if (!fb_plotters_clip_rect_ctx(&x0, &y0, &x1, &y1))
+ return true; /* line outside clipping */
pvideo = fb_32bpp_get_xy_loc(x0, y0);