Merge pull request #911

913ef54 Store cache on exit
pull/2/head
luigi1111 7 years ago
commit 05844b0a29
No known key found for this signature in database
GPG Key ID: F4ACA0183641E010

@ -650,6 +650,12 @@ Wallet::~Wallet()
delete m_history;
m_history = NULL;
//Monero::WalletManagerFactory::getWalletManager()->closeWallet(m_walletImpl);
if(status() == Status_Critical)
qDebug("Not storing wallet cache");
else if( m_walletImpl->store(""))
qDebug("Wallet cache stored successfully");
else
qDebug("Error storing wallet cache");
delete m_walletImpl;
m_walletImpl = NULL;
qDebug("m_walletImpl deleted");