From e8e32784774b1cd409d0dfea1f20e2b25e31618d Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Fri, 27 Jan 2017 22:43:49 +0100 Subject: Fix pixel buffer assertion in line draws outside the pixel buffer. --- plugingui/painter.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'plugingui') diff --git a/plugingui/painter.cc b/plugingui/painter.cc index 3c290f3..3e6fa48 100644 --- a/plugingui/painter.cc +++ b/plugingui/painter.cc @@ -54,7 +54,10 @@ void Painter::setColour(const Colour& colour) static void plot(PixelBufferAlpha& pixbuf, const Colour& colour, int x, int y, double c) { - if((x >= (int)pixbuf.width) || (y >= (int)pixbuf.height)) + if((x >= (int)pixbuf.width) || + (y >= (int)pixbuf.height) || + (x < 0) || + (y < 0)) { return; } -- cgit v1.2.3