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>
master
Carlos Garnacho 12 years ago 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;

Loading…
Cancel
Save