[mutter] wayland: Avoid use of struct data after destruction
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] wayland: Avoid use of struct data after destruction
- Date: Mon, 28 Sep 2015 14:30:38 +0000 (UTC)
commit 405f1ce3d07323fa1303416f322da7283160a7f9
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon Sep 28 14:24:04 2015 +0200
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 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/wayland/meta-wayland-data-device.c b/src/wayland/meta-wayland-data-device.c
index 1859b5d..61acdc6 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]