mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-11-30 03:03:17 +00:00
wallet_rpc_server: fix crash in validate_address if no wallet is loaded
Reported by SmajeNz0
This commit is contained in:
parent
475481949a
commit
968848a77b
1 changed files with 2 additions and 1 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue