fix crash when destroying an actor during a drag-action with a drag_handle
Bug introduced by commit 59801ef8
(drag-action: fix press coords transform
with drag_handle) for bgo#681746.
See also https://bugzilla.gnome.org/show_bug.cgi?id=681814
This commit is contained in:
parent
5586b0deba
commit
a0d9eaf15d
@ -1139,16 +1139,19 @@ clutter_drag_action_set_drag_handle (ClutterDragAction *action,
|
||||
|
||||
priv->drag_handle = handle;
|
||||
|
||||
priv->transformed_press_x = priv->press_x;
|
||||
priv->transformed_press_y = priv->press_y;
|
||||
clutter_actor_transform_stage_point (handle, priv->press_x, priv->press_y,
|
||||
&priv->transformed_press_x,
|
||||
&priv->transformed_press_y);
|
||||
|
||||
if (priv->drag_handle != NULL)
|
||||
g_signal_connect (priv->drag_handle, "destroy",
|
||||
G_CALLBACK (on_drag_handle_destroy),
|
||||
action);
|
||||
{
|
||||
priv->transformed_press_x = priv->press_x;
|
||||
priv->transformed_press_y = priv->press_y;
|
||||
clutter_actor_transform_stage_point (priv->drag_handle, priv->press_x,
|
||||
priv->press_y,
|
||||
&priv->transformed_press_x,
|
||||
&priv->transformed_press_y);
|
||||
|
||||
g_signal_connect (priv->drag_handle, "destroy",
|
||||
G_CALLBACK (on_drag_handle_destroy),
|
||||
action);
|
||||
}
|
||||
|
||||
g_object_notify_by_pspec (G_OBJECT (action), drag_props[PROP_DRAG_HANDLE]);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user