diff options
author | luigi1111 <luigi1111w@gmail.com> | 2021-08-11 22:30:53 -0400 |
---|---|---|
committer | luigi1111 <luigi1111w@gmail.com> | 2021-08-11 22:30:53 -0400 |
commit | f00db20a5f7d2f37cc8f729f09ce169a4284723f (patch) | |
tree | 3952605496a19a911ab7d175dfd2f917bf0ce112 | |
parent | Merge pull request #7791 (diff) | |
parent | fix #7784 - deinit wallet in wallet dtor (diff) | |
download | monero-f00db20a5f7d2f37cc8f729f09ce169a4284723f.tar.xz |
Merge pull request #7792
9b84043 fix #7784 - deinit wallet in wallet dtor (Dusan Klinec)
-rw-r--r-- | src/wallet/wallet2.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index af4c43b7e..0083d3952 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -1215,6 +1215,7 @@ wallet2::wallet2(network_type nettype, uint64_t kdf_rounds, bool unattended, std wallet2::~wallet2() { + deinit(); } bool wallet2::has_testnet_option(const boost::program_options::variables_map& vm) @@ -3692,9 +3693,11 @@ void wallet2::detach_blockchain(uint64_t height, std::map<std::pair<uint64_t, ui //---------------------------------------------------------------------------------------------------- bool wallet2::deinit() { - m_is_initialized=false; - unlock_keys_file(); - m_account.deinit(); + if(m_is_initialized) { + m_is_initialized = false; + unlock_keys_file(); + m_account.deinit(); + } return true; } //---------------------------------------------------------------------------------------------------- |