From 6202dbc0a805af099aac171903934bfc14ead6fa Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Tue, 16 Feb 2021 08:17:17 +0000 Subject: [PATCH] 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. --- src/wayland/dataoffer_interface.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/wayland/dataoffer_interface.cpp b/src/wayland/dataoffer_interface.cpp index f485bad573..934cb9f780 100644 --- a/src/wayland/dataoffer_interface.cpp +++ b/src/wayland/dataoffer_interface.cpp @@ -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 }