Fix wl_data_offer source destroy listener

The listener function implementation was getting a wrong pointer to the
wl_data_offer object because the resource parameter is actually the
data source and not the data offer.
This commit is contained in:
Ander Conselvan de Oliveira 2012-03-01 14:09:41 +02:00 committed by Kristian Høgsberg
parent eccc324ca8
commit cb3e102620

View file

@ -80,7 +80,10 @@ static void
destroy_offer_data_source(struct wl_listener *listener, destroy_offer_data_source(struct wl_listener *listener,
struct wl_resource *resource, uint32_t time) struct wl_resource *resource, uint32_t time)
{ {
struct wl_data_offer *offer = resource->data; struct wl_data_offer *offer;
offer = container_of(listener, struct wl_data_offer,
source_destroy_listener);
offer->source = NULL; offer->source = NULL;
} }