]> Nutra Git (v1) - gamesguru/feather.git/commitdiff
windowmanager: properly exit app on close if wallet failed to open
authortobtoht <tob@featherwallet.org>
Sun, 6 Oct 2024 22:22:12 +0000 (00:22 +0200)
committertobtoht <tob@featherwallet.org>
Sun, 6 Oct 2024 22:22:12 +0000 (00:22 +0200)
src/WindowManager.cpp

index a34eae9c955fa0ffc82d59e3607611d27c68c052..48b5de1f230f5e5552a9c32e6e54d09cb0ca5760 100644 (file)
@@ -284,6 +284,7 @@ void WindowManager::onWalletOpened(Wallet *wallet) {
             bool showIncorrectPassword = m_openWalletTriedOnce;
             m_openWalletTriedOnce = true;
             this->onWalletOpenPasswordRequired(showIncorrectPassword, wallet->keysPath());
+            return; // Do not remove this
         }
         else if (errMsg == QString("basic_string::_M_replace_aux") || errMsg == QString("std::bad_alloc") || errMsg == "invalid signature") {
             qCritical() << errMsg;
@@ -304,6 +305,8 @@ void WindowManager::onWalletOpened(Wallet *wallet) {
             this->handleDeviceError(errMsg, message);
             this->handleWalletError(message);
         }
+
+        m_openingWallet = false;
         return;
     }