1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
From 1e535b190e4ad71ccfd570f086f6278047417616 Mon Sep 17 00:00:00 2001
From: Steve Langasek <vorlon@debian.org>
Date: Mon, 27 Jan 2014 07:47:13 +0000
Subject: Fix segfault on left mouse click when Lines is NULL
This happens, for instance, when trying to move with no drawn lines.
Bug-Debian: http://bugs.debian.org/283629
Forwarded: no
Last-Update: 2010-05-26
Patch-Name: lines-segfault.patch
---
kali.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kali.c b/kali.c
index 4f84a8b..cc9d62c 100644
--- a/kali.c
+++ b/kali.c
@@ -180,7 +180,7 @@ void handleLeftmouse(int how, int x, int y)
case KALIDRAW:
case KALIMOVE:
case KALIPICK:
- if(RectIncludesPoint(sym_rect, tmppoint)) {
+ if(RectIncludesPoint(sym_rect, tmppoint) && Lines) {
tmppoint.x -= refpoint.x;
tmppoint.y -= refpoint.y;
VectorMatrixMult(&tmppoint,xforms[4],&tmppoint);
|