From 8f63e8013bba6fea9562339c2ed8b3eb1c8e3138 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Thu, 31 May 2012 23:26:50 -0400 Subject: [PATCH] data-device: Only send out NULL selection if we have a resource If the current keyboard focus client doesn't have a resource for the data_device, don't send out the selection event. --- src/data-device.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/data-device.c b/src/data-device.c index 60e75787..843fcca5 100644 --- a/src/data-device.c +++ b/src/data-device.c @@ -356,7 +356,8 @@ destroy_selection_data_source(struct wl_listener *listener, void *data) if (focus) { data_device = find_resource(&seat->drag_resource_list, focus->client); - wl_data_device_send_selection(data_device, NULL); + if (data_device) + wl_data_device_send_selection(data_device, NULL); } }