From 60e190ceb3563a8102d42fdfcbefccdd1b53e812 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Barbosa?= Date: Tue, 29 Jan 2019 00:06:17 +0000 Subject: gui: Fix WalletController deletion The wallet controller instanced must be deleted after the window instance since it is used there. --- src/qt/bitcoin.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/qt') diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp index ca26131b95..0f06bbaaa6 100644 --- a/src/qt/bitcoin.cpp +++ b/src/qt/bitcoin.cpp @@ -218,6 +218,8 @@ BitcoinApplication::~BitcoinApplication() #ifdef ENABLE_WALLET delete paymentServer; paymentServer = nullptr; + delete m_wallet_controller; + m_wallet_controller = nullptr; #endif delete optionsModel; optionsModel = nullptr; @@ -310,10 +312,6 @@ void BitcoinApplication::requestShutdown() window->setClientModel(nullptr); pollShutdownTimer->stop(); -#ifdef ENABLE_WALLET - delete m_wallet_controller; - m_wallet_controller = nullptr; -#endif delete clientModel; clientModel = nullptr; -- cgit v1.2.3