Prevent crash if the controller didn't handle TOUCH_BEGIN

Fixes http://bugs.sugarlabs.org/ticket/4024

Signed-off-by: Carlos Garnacho <[email protected]>
Acked-by: Simon Schampijer <[email protected]>
This commit is contained in:
Carlos Garnacho
2012-10-16 10:02:48 +02:00
committed by Simon Schampijer
parent e4e1881662
commit 4682e49823
@@ -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;