diff options
author | Derek Foreman <derekf@osg.samsung.com> | 2017-04-20 14:31:37 -0500 |
---|---|---|
committer | Daniel Stone <daniels@collabora.com> | 2017-12-04 19:03:29 +0000 |
commit | bd9069ffadbac80d36a442dd903492501c0c8f63 (patch) | |
tree | 16dbb0ed89a93a646fbfe38ea24bc6b6f0a68683 | |
parent | 11b6242ba9a0e4b680bce82243ed1bc94b1987c4 (diff) |
dnd: Abort with an error message if compositor doesn't support drag and drop
This test isn't particularly useful when the compositor doesn't support
drag and drop - so bail if we fail to create a data source.
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
-rw-r--r-- | clients/dnd.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clients/dnd.c b/clients/dnd.c index 41e532ef..ec706bff 100644 --- a/clients/dnd.c +++ b/clients/dnd.c @@ -534,6 +534,10 @@ create_drag_source(struct dnd *dnd, } else { dnd_drag->data_source = display_create_data_source(dnd->display); + if (!dnd_drag->data_source) { + fprintf(stderr, "No data device manager\n"); + abort(); + } wl_data_source_add_listener(dnd_drag->data_source, &data_source_listener, dnd_drag); |