aboutsummaryrefslogtreecommitdiff
path: root/src/libwalletqt/Wallet.cpp
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2017-03-27 21:22:08 +0200
committerRiccardo Spagni <ric@spagni.net>2017-03-27 21:22:08 +0200
commit6ba2548273e40967fb8817f6c2a25ee4af763688 (patch)
treec3a2ebde823e965de7255199ec5f4e3e944d07bf /src/libwalletqt/Wallet.cpp
parent615ef5342eadb6e18b230726d9650318a6382ad8 (diff)
parentd730766479bf0a3c24b2ce738b68ca6219d57699 (diff)
downloadmonzero-gui-6ba2548273e40967fb8817f6c2a25ee4af763688.tar.gz
monzero-gui-6ba2548273e40967fb8817f6c2a25ee4af763688.tar.xz
monzero-gui-6ba2548273e40967fb8817f6c2a25ee4af763688.zip
Merge pull request #612
d730766 useForkRules() - Catch no connection error (Jaquee)
Diffstat (limited to 'src/libwalletqt/Wallet.cpp')
-rw-r--r--src/libwalletqt/Wallet.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/libwalletqt/Wallet.cpp b/src/libwalletqt/Wallet.cpp
index 6f397766..b79d77e5 100644
--- a/src/libwalletqt/Wallet.cpp
+++ b/src/libwalletqt/Wallet.cpp
@@ -589,7 +589,14 @@ bool Wallet::rescanSpent()
bool Wallet::useForkRules(quint8 required_version, quint64 earlyBlocks) const
{
- return m_walletImpl->useForkRules(required_version,earlyBlocks);
+ if(m_connectionStatus == Wallet::ConnectionStatus_Disconnected)
+ return false;
+ try {
+ return m_walletImpl->useForkRules(required_version,earlyBlocks);
+ } catch (const std::exception &e) {
+ qDebug() << e.what();
+ return false;
+ }
}
Wallet::Wallet(Monero::Wallet *w, QObject *parent)