diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2019-06-03 22:08:16 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2019-06-03 22:08:32 +0200 |
commit | 38523721ac39b083b4560d7970cb1699d10b8db2 (patch) | |
tree | 260a8c31e7ea539cfda74d249f49ae57ad486baf /src | |
parent | c7cfd20a77ce57d200b3b9e5e0dfb0d63818abdc (diff) | |
parent | d2ae6be80f6a0156021bf8c9b9d17cd4966ddffc (diff) | |
download | bitcoin-38523721ac39b083b4560d7970cb1699d10b8db2.tar.xz |
Merge #16135: gui: Set progressDialog to nullptr
d2ae6be80f6a0156021bf8c9b9d17cd4966ddffc 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 d2ae6be80f6a0156021bf8c9b9d17cd4966ddffc
fanquake:
tACK https://github.com/bitcoin/bitcoin/pull/16135/commits/d2ae6be80f6a0156021bf8c9b9d17cd4966ddffc
Tree-SHA512: 300ddde2f27c494b19a5bd4085400d0f5a1d4980fe8cc3c07bfebb037efc35f777215ff1a095eeb16658407e11f04456137393e88a12fdd767b7aac5f12eab5e
Diffstat (limited to 'src')
-rw-r--r-- | src/qt/bitcoingui.cpp | 1 | ||||
-rw-r--r-- | src/qt/walletview.cpp | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index ff66df376b..b5c92e10a2 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -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); diff --git a/src/qt/walletview.cpp b/src/qt/walletview.cpp index 5f6f93d948..be47f67f95 100644 --- a/src/qt/walletview.cpp +++ b/src/qt/walletview.cpp @@ -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()) { |