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>
This commit is contained in:
parent
e4e1881662
commit
4682e49823
@ -129,8 +129,14 @@ sugar_touch_controller_handle_event (SugarEventController *controller,
|
|||||||
break;
|
break;
|
||||||
case GDK_TOUCH_UPDATE:
|
case GDK_TOUCH_UPDATE:
|
||||||
point = g_hash_table_lookup (priv->touches, sequence);
|
point = g_hash_table_lookup (priv->touches, sequence);
|
||||||
|
|
||||||
|
if (point)
|
||||||
|
{
|
||||||
point->x = event->touch.x;
|
point->x = event->touch.x;
|
||||||
point->y = event->touch.y;
|
point->y = event->touch.y;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
handled = FALSE;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
handled = FALSE;
|
handled = FALSE;
|
||||||
|
Loading…
Reference in New Issue
Block a user