diff --git a/clutter/clutter-gesture-action.c b/clutter/clutter-gesture-action.c index 78c72b8fd..ec2cb7bda 100644 --- a/clutter/clutter-gesture-action.c +++ b/clutter/clutter-gesture-action.c @@ -224,6 +224,9 @@ gesture_unregister_point (ClutterGestureAction *action, gint position) { ClutterGestureActionPrivate *priv = action->priv; + if (action->priv->points->len == 0) + return; + g_array_remove_index (priv->points, position); } @@ -480,7 +483,7 @@ stage_captured_event_cb (ClutterActor *stage, break; } - if (priv->points->len == 0) + if (priv->points->len == 0 && priv->stage_capture_id) { g_signal_handler_disconnect (priv->stage, priv->stage_capture_id); priv->stage_capture_id = 0;