From 71ba9f6d4ad30bbce54106c9f7187463f45fb096 Mon Sep 17 00:00:00 2001 From: mrdeveloper Date: Fri, 23 Oct 2020 19:57:06 +0200 Subject: [PATCH] BugFix: show message box if no wallet is selected --- src/wizard/openwallet.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/wizard/openwallet.cpp b/src/wizard/openwallet.cpp index 4d5436a..e013465 100644 --- a/src/wizard/openwallet.cpp +++ b/src/wizard/openwallet.cpp @@ -66,6 +66,10 @@ int OpenWalletPage::nextId() const { bool OpenWalletPage::validatePage() { QModelIndex index = ui->walletTable->currentIndex(); + if(!index.isValid()) { + Utils::showMessageBox("Wallet not selected", "Please select a wallet from the list.", true); + return false; + } QString walletPath = index.model()->data(index.siblingAtColumn(WalletKeysFilesModel::ModelColumns::Path), Qt::UserRole).toString(); auto autoWallet = ui->openOnStartup->isChecked() ? QString("%1%2").arg(m_ctx->networkType).arg(walletPath) : "";