From 023d96bc3efc394095a6376ff9b969ac935e590e Mon Sep 17 00:00:00 2001 From: Jaquee Date: Sat, 25 Feb 2017 00:19:37 +0100 Subject: [PATCH] avoid dangling pointers in destructor --- src/libwalletqt/Wallet.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libwalletqt/Wallet.cpp b/src/libwalletqt/Wallet.cpp index 8913d4c3..abc044b5 100644 --- a/src/libwalletqt/Wallet.cpp +++ b/src/libwalletqt/Wallet.cpp @@ -600,7 +600,9 @@ Wallet::~Wallet() qDebug("~Wallet: Closing wallet"); delete m_history; + m_history = NULL; //Monero::WalletManagerFactory::getWalletManager()->closeWallet(m_walletImpl); delete m_walletImpl; + m_walletImpl = NULL; qDebug("m_walletImpl deleted"); }