Merge pull request #7868

36527c0 UB: virtual method in destructor of WalletImpl v0.17 (mj-xmr)
This commit is contained in:
luigi1111 2021-10-17 23:27:23 -05:00
commit 1aad001d96
No known key found for this signature in database
GPG Key ID: F4ACA0183641E010

View File

@ -453,7 +453,7 @@ WalletImpl::~WalletImpl()
LOG_PRINT_L1(__FUNCTION__); LOG_PRINT_L1(__FUNCTION__);
m_wallet->callback(NULL); m_wallet->callback(NULL);
// Pause refresh thread - prevents refresh from starting again // Pause refresh thread - prevents refresh from starting again
pauseRefresh(); WalletImpl::pauseRefresh(); // Call the method directly (not polymorphically) to protect against UB in destructor.
// Close wallet - stores cache and stops ongoing refresh operation // Close wallet - stores cache and stops ongoing refresh operation
close(false); // do not store wallet as part of the closing activities close(false); // do not store wallet as part of the closing activities
// Stop refresh thread // Stop refresh thread