diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-04-24 17:27:44 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-04-25 23:35:37 +0000 |
commit | 968848a77b9761f42d4ae1df8a30a48e381024c6 (patch) | |
tree | 034c23c33577b08a3c1140a1f065798d3df670e3 /src/wallet | |
parent | Merge pull request #5466 (diff) | |
download | monero-968848a77b9761f42d4ae1df8a30a48e381024c6.tar.xz |
wallet_rpc_server: fix crash in validate_address if no wallet is loaded
Reported by SmajeNz0
Diffstat (limited to 'src/wallet')
-rw-r--r-- | src/wallet/wallet_rpc_server.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/wallet/wallet_rpc_server.cpp b/src/wallet/wallet_rpc_server.cpp index aaad82bb7..fc18e21e8 100644 --- a/src/wallet/wallet_rpc_server.cpp +++ b/src/wallet/wallet_rpc_server.cpp @@ -4067,9 +4067,10 @@ namespace tools { cryptonote::TESTNET, "testnet" }, { cryptonote::STAGENET, "stagenet" }, }; + if (!req.any_net_type && !m_wallet) return not_open(er); for (const auto &net_type: net_types) { - if (!req.any_net_type && net_type.type != m_wallet->nettype()) + if (!req.any_net_type && (!m_wallet || net_type.type != m_wallet->nettype())) continue; if (req.allow_openalias) { |