diff options
| author | Jaquee <jaquee.monero@gmail.com> | 2017-03-26 19:02:18 +0200 |
|---|---|---|
| committer | Jaquee <jaquee.monero@gmail.com> | 2017-03-26 19:02:18 +0200 |
| commit | d730766479bf0a3c24b2ce738b68ca6219d57699 (patch) | |
| tree | b3237df6bf3924965153de1606d10f149a2b5098 /src/libwalletqt/Wallet.cpp | |
| parent | 12573652a0a5836938b02a2308098929fdf06ab4 (diff) | |
| download | monzero-gui-d730766479bf0a3c24b2ce738b68ca6219d57699.tar.gz monzero-gui-d730766479bf0a3c24b2ce738b68ca6219d57699.tar.xz monzero-gui-d730766479bf0a3c24b2ce738b68ca6219d57699.zip | |
useForkRules() - Catch no connection error
Diffstat (limited to 'src/libwalletqt/Wallet.cpp')
| -rw-r--r-- | src/libwalletqt/Wallet.cpp | 9 |
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) |
