gesture-action: fix memory corruption

abcf1d589f 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
This commit is contained in:
Lionel Landwerlin 2013-10-15 18:23:46 +01:00
parent cbb9d1e062
commit 97724939c8

View File

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