diff options
author | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2021-08-11 20:30:49 +0300 |
---|---|---|
committer | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2021-08-14 19:19:03 +0300 |
commit | b8aa84b1a116599a6dd3b9ddb4e6c178a6688b1b (patch) | |
tree | b2618c5ca75ff0d7678ed23c0d79e9f72b1aca93 /src/qt | |
parent | fcdc8b0fcb9dc81b76289abc57a4203671f748eb (diff) | |
download | bitcoin-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')
-rw-r--r-- | src/qt/bitcoingui.cpp | 5 |
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; |