diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index c128eda67..16504e3a1 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -12667,6 +12667,7 @@ std::string wallet2::get_keys_file() const std::string wallet2::get_daemon_address() const { + boost::lock_guard lock(m_daemon_rpc_mutex); return m_daemon_address; } diff --git a/src/wallet/wallet2.h b/src/wallet/wallet2.h index e310d6441..816fbc460 100644 --- a/src/wallet/wallet2.h +++ b/src/wallet/wallet2.h @@ -1659,7 +1659,7 @@ private: std::atomic m_run; - boost::recursive_mutex m_daemon_rpc_mutex; + mutable boost::recursive_mutex m_daemon_rpc_mutex; bool m_trusted_daemon; i_wallet2_callback* m_callback;