Skip to content

Commit 3852372

Browse files
committed
Merge #16135: gui: Set progressDialog to nullptr
d2ae6be 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: utACK d2ae6be fanquake: tACK bitcoin/bitcoin@d2ae6be Tree-SHA512: 300ddde2f27c494b19a5bd4085400d0f5a1d4980fe8cc3c07bfebb037efc35f777215ff1a095eeb16658407e11f04456137393e88a12fdd767b7aac5f12eab5e
2 parents c7cfd20 + d2ae6be commit 3852372

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/qt/bitcoingui.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1341,6 +1341,7 @@ void BitcoinGUI::showProgress(const QString &title, int nProgress)
13411341
if (progressDialog) {
13421342
progressDialog->close();
13431343
progressDialog->deleteLater();
1344+
progressDialog = nullptr;
13441345
}
13451346
} else if (progressDialog) {
13461347
progressDialog->setValue(nProgress);

src/qt/walletview.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,7 @@ void WalletView::showProgress(const QString &title, int nProgress)
316316
if (progressDialog) {
317317
progressDialog->close();
318318
progressDialog->deleteLater();
319+
progressDialog = nullptr;
319320
}
320321
} else if (progressDialog) {
321322
if (progressDialog->wasCanceled()) {

0 commit comments

Comments
 (0)