[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: https://phabricator.kde.org/D15074
This commit is contained in:
parent
c9bac2d41d
commit
a160143d57
1 changed files with 4 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
Q_Q(DataDeviceInterface);
|
||||
DataOfferInterface *offer = new DataOfferInterface(source, q, resource);
|
||||
auto c = q->global()->display()->getConnection(wl_resource_get_client(resource));
|
||||
|
|
Loading…
Reference in a new issue