[mutter/wayland] wayland: Fix destroying data sources



commit f79314d7b5a5a96b63e9a74619f5fafc3f134fdb
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Tue Mar 11 15:29:05 2014 -0400

    wayland: Fix destroying data sources
    
    The resource is not embedded in the source, it's separate. We need
    to get the user data here to not crash.

 src/wayland/meta-wayland-data-device.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/wayland/meta-wayland-data-device.c b/src/wayland/meta-wayland-data-device.c
index 8982356..7690214 100644
--- a/src/wayland/meta-wayland-data-device.c
+++ b/src/wayland/meta-wayland-data-device.c
@@ -451,7 +451,7 @@ static const struct wl_data_device_interface data_device_interface = {
 static void
 destroy_data_source (struct wl_resource *resource)
 {
-  MetaWaylandDataSource *source = wl_container_of (resource, source, resource);
+  MetaWaylandDataSource *source = wl_resource_get_user_data (resource);
   char **p;
 
   wl_array_for_each (p, &source->mime_types) free (*p);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]