summaryrefslogtreecommitdiff
path: root/plugingui
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2017-01-27 22:43:49 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2017-01-27 22:43:49 +0100
commite8e32784774b1cd409d0dfea1f20e2b25e31618d (patch)
tree5e53c5dbb1b1469f4d62156d06649b304e4a1dbf /plugingui
parentf5caf0abae6ee897e71e7c4e905193703eb5bdf7 (diff)
Fix pixel buffer assertion in line draws outside the pixel buffer.
Diffstat (limited to 'plugingui')
-rw-r--r--plugingui/painter.cc5
1 files changed, 4 insertions, 1 deletions
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;
}