From ef539368d91a30763866ab945d5777fdafa24f2a Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Thu, 23 Jul 2020 11:15:34 +0100 Subject: [PATCH] Emit signal before DataControlSource destruction SeatInterface cleans up when a data source goes away. However the cleanup also makes use of metaobjects so needs to run before the leaf class destructor is run. All other AbstractDataSource objects emit the unbound signal, which SeatInterface also connects to do a earlier cleanup. Otherwise we get a crash if a data control source replaces itself. --- src/wayland/datacontrolsource_v1_interface.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/wayland/datacontrolsource_v1_interface.cpp b/src/wayland/datacontrolsource_v1_interface.cpp index cf9ed49946..05a68c1d2b 100644 --- a/src/wayland/datacontrolsource_v1_interface.cpp +++ b/src/wayland/datacontrolsource_v1_interface.cpp @@ -40,6 +40,7 @@ DataControlSourceV1InterfacePrivate::DataControlSourceV1InterfacePrivate(DataCon void DataControlSourceV1InterfacePrivate::zwlr_data_control_source_v1_destroy_resource(QtWaylandServer::zwlr_data_control_source_v1::Resource *resource) { Q_UNUSED(resource) + emit q->unbound(); delete q; }