Guard against DataSource being deleted during transfer

During a drag the source can disappear at any time. The other client
will be notified, but it may have actions in flight.

Other methods were guarded but not data_offer_finished.
This commit is contained in:
David Edmundson 2021-02-16 08:17:17 +00:00
parent 64744103dc
commit 6202dbc0a8

View file

@ -75,6 +75,9 @@ void DataOfferInterfacePrivate::data_offer_destroy(QtWaylandServer::wl_data_offe
void DataOfferInterfacePrivate::data_offer_finish(Resource *resource)
{
Q_UNUSED(resource)
if (!source) {
return;
}
source->dndFinished();
// TODO: It is a client error to perform other requests than wl_data_offer.destroy after this one
}