diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 80cc8ee27..91a5420d7 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -12699,6 +12699,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 018ce3bd9..91e076b0a 100644 --- a/src/wallet/wallet2.h +++ b/src/wallet/wallet2.h @@ -1660,7 +1660,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;