windowmanager: properly exit app on close if wallet failed to open

This commit is contained in:
tobtoht 2024-10-07 00:22:12 +02:00
parent e350af3492
commit ec8d3bff57
No known key found for this signature in database
GPG key ID: E45B10DD027D2472

View 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;
}