Commit a421a5c0 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧

Make sure we don't end up with a stale transaction

It seems to be a crash some people get sometimes, better safe than
sorry.

BUG: 394737
parent 6d63fd35
......@@ -127,6 +127,10 @@ void TransactionListener::setTransaction(Transaction* trans)
connect(m_transaction, &Transaction::cancellableChanged, this, &TransactionListener::cancellableChanged);
connect(m_transaction, &Transaction::statusChanged, this, &TransactionListener::transactionStatusChanged);
connect(m_transaction, &Transaction::progressChanged, this, &TransactionListener::progressChanged);
connect(m_transaction, &QObject::destroyed, this, [this]() {
qDebug() << "destroyed transaction before finishing";
setTransaction(nullptr);
});
setResourceInternal(trans->resource());
}
Q_EMIT transactionChanged(trans);
......
Markdown is supported
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