Merge #16135: gui: Set progressDialog to nullptr
d2ae6be80f
gui: Set progressDialog to nullptr (João Barbosa) Pull request description: If a progress notification `> 0` arrives immediately after notification `= 100` then `progressDialog` is a dangling pointer. Potential fix for #16134. ACKs for commit d2ae6b: hebasto: utACKd2ae6be80f
fanquake: tACKd2ae6be80f
Tree-SHA512: 300ddde2f27c494b19a5bd4085400d0f5a1d4980fe8cc3c07bfebb037efc35f777215ff1a095eeb16658407e11f04456137393e88a12fdd767b7aac5f12eab5e
This commit is contained in:
commit
38523721ac
2 changed files with 2 additions and 0 deletions
|
@ -1341,6 +1341,7 @@ void BitcoinGUI::showProgress(const QString &title, int nProgress)
|
|||
if (progressDialog) {
|
||||
progressDialog->close();
|
||||
progressDialog->deleteLater();
|
||||
progressDialog = nullptr;
|
||||
}
|
||||
} else if (progressDialog) {
|
||||
progressDialog->setValue(nProgress);
|
||||
|
|
|
@ -316,6 +316,7 @@ void WalletView::showProgress(const QString &title, int nProgress)
|
|||
if (progressDialog) {
|
||||
progressDialog->close();
|
||||
progressDialog->deleteLater();
|
||||
progressDialog = nullptr;
|
||||
}
|
||||
} else if (progressDialog) {
|
||||
if (progressDialog->wasCanceled()) {
|
||||
|
|
Loading…
Reference in a new issue