Commit 97724939 authored by Lionel Landwerlin's avatar Lionel Landwerlin

gesture-action: fix memory corruption

abcf1d58 introduced a crasher because
the 'point' variable points to a piece of memory that is being
reallocated by the begin_gesture (by a g_array_set_size) call 5 lines
before.

https://bugzilla.gnome.org/show_bug.cgi?id=710227
parent cbb9d1e0
......@@ -396,11 +396,15 @@ stage_captured_event_cb (ClutterActor *stage,
return CLUTTER_EVENT_PROPAGATE;
}
if (!begin_gesture(action, actor))
if (!begin_gesture (action, actor))
{
gesture_update_motion_point (point, event);
if ((point = gesture_find_point (action, event, &position)) != NULL)
gesture_update_motion_point (point, event);
return CLUTTER_EVENT_PROPAGATE;
}
if ((point = gesture_find_point (action, event, &position)) == NULL)
return CLUTTER_EVENT_PROPAGATE;
}
gesture_update_motion_point (point, event);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment