diff options
author | Kristian Høgsberg <krh@bitplanet.net> | 2013-08-20 15:58:25 -0700 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2013-08-20 15:58:25 -0700 |
commit | a34e2f2adc4bc32cc5d7e13c2bc5656449b298fa (patch) | |
tree | 171edb4c0f50e88823edf77358fe1fa7a81f5d3a /src/data-device.c | |
parent | ab19f937c29ddf008e402e1407ea3dc8243e861b (diff) | |
download | weston-a34e2f2adc4bc32cc5d7e13c2bc5656449b298fa.tar.gz |
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.
Diffstat (limited to 'src/data-device.c')
-rw-r--r-- | src/data-device.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/data-device.c b/src/data-device.c index 25587b26..1eb19257 100644 --- a/src/data-device.c +++ b/src/data-device.c @@ -236,11 +236,12 @@ weston_drag_set_focus(struct weston_drag *drag, struct weston_surface *surface, 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); |