Commit 04d1d5e9 authored by David Edmundson's avatar David Edmundson
Browse files

[xwl] Avoid deletion of Transfer in signals from Transfer.

Transfer emits "finished" mid way through it's own methods. If we delete
here transfer is left in the middle of methods like Transfer::timeout
with a dangling "this".

(cherry picked from commit f3d46cee)
parent 80ff3786
......@@ -281,7 +281,7 @@ void Selection::startTransferToWayland(xcb_atom_t target, qint32 fd)
connect(transfer, &TransferXtoWl::finished, this, [this, transfer]() {
Q_EMIT transferFinished(transfer->timestamp());
delete transfer;
transfer->deleteLater();
m_xToWlTransfers.removeOne(transfer);
endTimeoutTransfersTimer();
});
......@@ -299,7 +299,7 @@ void Selection::startTransferToX(xcb_selection_request_event_t *event, qint32 fd
// TODO: serialize? see comment below.
// const bool wasActive = (transfer == m_wlToXTransfers[0]);
delete transfer;
transfer->deleteLater();
m_wlToXTransfers.removeOne(transfer);
endTimeoutTransfersTimer();
// if (wasActive && !m_wlToXTransfers.isEmpty()) {
......
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