data-device: Only bail out if we failed to allocate offer
It's valid to have a NULL data source (self-dnd) in which case we send
a NULL offer on enter.
diff --git a/src/data-device.c b/src/data-device.c
index 25587b2..1eb1925 100644
--- a/src/data-device.c
+++ b/src/data-device.c
@@ -236,11 +236,12 @@
serial = wl_display_next_serial(display);
- if (drag->data_source)
+ if (drag->data_source) {
offer = weston_data_source_send_offer(drag->data_source,
resource);
- if (offer == NULL)
- return;
+ if (offer == NULL)
+ return;
+ }
wl_data_device_send_enter(resource, serial, surface->resource,
sx, sy, offer);