window: Don't call drag_offer_handler if it's NULL

Reported by canbaby@21cn.com.
dev
Kristian Høgsberg 14 years ago
parent a6d9e11447
commit 8857a96a97
  1. 6
      clients/window.c

@ -1330,8 +1330,10 @@ display_handle_global(struct wl_display *display, uint32_t id,
} else if (strcmp(interface, "shm") == 0) {
d->shm = wl_shm_create(display, id);
} else if (strcmp(interface, "drag_offer") == 0) {
offer = wl_drag_offer_create(display, id);
d->drag_offer_handler(offer, d);
if (d->drag_offer_handler) {
offer = wl_drag_offer_create(display, id);
d->drag_offer_handler(offer, d);
}
}
}

Loading…
Cancel
Save