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:
Carlos Garnacho 2012-10-11 18:50:33 +02:00 committed by Simon Schampijer
parent e4e1881662
commit 4682e49823

View File

@ -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;