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.
This commit is contained in:
Jasper St. Pierre 2014-03-11 15:29:05 -04:00
parent 55c61259d8
commit f79314d7b5

View File

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