From 8857a96a97be66200d941c96e99d1cb917086789 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Mon, 22 Nov 2010 13:02:21 -0500 Subject: [PATCH] window: Don't call drag_offer_handler if it's NULL Reported by canbaby@21cn.com. --- clients/window.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/clients/window.c b/clients/window.c index 3abc2b0b..9ed96be8 100644 --- a/clients/window.c +++ b/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); + } } }