Commit a160143d authored by Roman Gilg's avatar Roman Gilg
Browse files

[server] Do not try to create data offers without source

Summary: An internal drag is without data source. Still we tried to create offers.

Test Plan: This change makes the updated autotest in D15072 pass without errors.

Reviewers: #kwin, hein

Reviewed By: hein

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision:
parent c9bac2d4
......@@ -159,6 +159,10 @@ DataOfferInterface *DataDeviceInterface::Private::createDataOffer(DataSourceInte
if (!resource) {
return nullptr;
if (!source) {
// a data offer can only exist together with a source
return nullptr;
DataOfferInterface *offer = new DataOfferInterface(source, q, resource);
auto c = q->global()->display()->getConnection(wl_resource_get_client(resource));
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment