From b8aa84b1a116599a6dd3b9ddb4e6c178a6688b1b Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Wed, 11 Aug 2021 20:30:49 +0300 Subject: [PATCH] qt, refactor: Replace `if` check with `assert` There are no ways BitcoinGUI::updateWalletStatus being called without an instance of the WalletFrame class. --- src/qt/bitcoingui.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index 21bbe791825..f30dd92e615 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;