From 405f1ce3d07323fa1303416f322da7283160a7f9 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Mon, 28 Sep 2015 14:24:04 +0200 Subject: [PATCH] wayland: Avoid use of struct data after destruction data_device_end_drag_grab() will destroy the MetaWaylandDragGrab struct, so we definitely must not use it after destruction. --- src/wayland/meta-wayland-data-device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wayland/meta-wayland-data-device.c b/src/wayland/meta-wayland-data-device.c index 1859b5dc2..61acdc6d9 100644 --- a/src/wayland/meta-wayland-data-device.c +++ b/src/wayland/meta-wayland-data-device.c @@ -403,8 +403,8 @@ destroy_data_device_origin (struct wl_listener *listener, void *data) wl_container_of (listener, drag_grab, drag_origin_listener); drag_grab->drag_origin = NULL; - data_device_end_drag_grab (drag_grab); meta_wayland_data_device_set_dnd_source (&drag_grab->seat->data_device, NULL); + data_device_end_drag_grab (drag_grab); } static void @@ -413,8 +413,8 @@ drag_grab_data_source_destroyed (gpointer data, GObject *where_the_object_was) MetaWaylandDragGrab *drag_grab = data; drag_grab->drag_data_source = NULL; - data_device_end_drag_grab (drag_grab); meta_wayland_data_device_set_dnd_source (&drag_grab->seat->data_device, NULL); + data_device_end_drag_grab (drag_grab); } static void