Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarlos Garnacho <carlos@lanedo.com>2012-10-11 16:50:33 (GMT)
committer Simon Schampijer <simon@laptop.org>2012-10-16 08:02:48 (GMT)
commit4682e49823c2ba45a23a33e3c3bc4ba610a40ab2 (patch)
tree633ba49b51158055eeb2758a34f193db2d4a704e
parente4e1881662f773ae8dedc2cea87396f9047ed2fd (diff)
Prevent crash if the controller didn't handle TOUCH_BEGIN
Fixes http://bugs.sugarlabs.org/ticket/4024 Signed-off-by: Carlos Garnacho <carlos@lanedo.com> Acked-by: Simon Schampijer <simon@laptop.org>
-rw-r--r--src/sugar3/event-controller/sugar-touch-controller.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/sugar3/event-controller/sugar-touch-controller.c b/src/sugar3/event-controller/sugar-touch-controller.c
index 0614a25..556c98b 100644
--- a/src/sugar3/event-controller/sugar-touch-controller.c
+++ b/src/sugar3/event-controller/sugar-touch-controller.c
@@ -129,8 +129,14 @@ sugar_touch_controller_handle_event (SugarEventController *controller,
break;
case GDK_TOUCH_UPDATE:
point = g_hash_table_lookup (priv->touches, sequence);
- point->x = event->touch.x;
- point->y = event->touch.y;
+
+ if (point)
+ {
+ point->x = event->touch.x;
+ point->y = event->touch.y;
+ }
+ else
+ handled = FALSE;
break;
default:
handled = FALSE;