aboutsummaryrefslogtreecommitdiff
path: root/src/qt/bitcoingui.cpp
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2021-08-11 20:30:49 +0300
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2021-08-14 19:19:03 +0300
commitb8aa84b1a116599a6dd3b9ddb4e6c178a6688b1b (patch)
treeb2618c5ca75ff0d7678ed23c0d79e9f72b1aca93 /src/qt/bitcoingui.cpp
parentfcdc8b0fcb9dc81b76289abc57a4203671f748eb (diff)
downloadbitcoin-b8aa84b1a116599a6dd3b9ddb4e6c178a6688b1b.tar.xz
qt, refactor: Replace `if` check with `assert`
There are no ways BitcoinGUI::updateWalletStatus being called without an instance of the WalletFrame class.
Diffstat (limited to 'src/qt/bitcoingui.cpp')
-rw-r--r--src/qt/bitcoingui.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index 21bbe79182..f30dd92e61 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -1340,9 +1340,8 @@ void BitcoinGUI::setEncryptionStatus(int status)
void BitcoinGUI::updateWalletStatus()
{
- if (!walletFrame) {
- return;
- }
+ assert(walletFrame);
+
WalletView * const walletView = walletFrame->currentWalletView();
if (!walletView) {
return;