window: Handle data_device.selection events with offer=NULL

This happens when the current selection data_offer is removed.
dev
Kristian Høgsberg 13 years ago
parent 804e05185b
commit 42c8f60506
  1. 8
      clients/window.c

@ -1866,9 +1866,11 @@ data_device_selection(void *data,
if (input->selection_offer) if (input->selection_offer)
data_offer_destroy(input->selection_offer); data_offer_destroy(input->selection_offer);
input->selection_offer = wl_data_offer_get_user_data(offer); if (offer) {
p = wl_array_add(&input->selection_offer->types, sizeof *p); input->selection_offer = wl_data_offer_get_user_data(offer);
*p = NULL; p = wl_array_add(&input->selection_offer->types, sizeof *p);
*p = NULL;
}
} }
static const struct wl_data_device_listener data_device_listener = { static const struct wl_data_device_listener data_device_listener = {

Loading…
Cancel
Save