aboutsummaryrefslogtreecommitdiff
path: root/src/qt
diff options
context:
space:
mode:
authorJoão Barbosa <joao.paulo.barbosa@gmail.com>2019-01-29 00:06:17 +0000
committerJoão Barbosa <joao.paulo.barbosa@gmail.com>2019-02-03 22:23:43 +0000
commit60e190ceb3563a8102d42fdfcbefccdd1b53e812 (patch)
tree67dac9dbfa8c1c5f24606d6fd9a855c0aca87687 /src/qt
parent2fbf6a57d282d80c128c910dd1fcdd0ee0542654 (diff)
downloadbitcoin-60e190ceb3563a8102d42fdfcbefccdd1b53e812.tar.xz
gui: Fix WalletController deletion
The wallet controller instanced must be deleted after the window instance since it is used there.
Diffstat (limited to 'src/qt')
-rw-r--r--src/qt/bitcoin.cpp6
1 files changed, 2 insertions, 4 deletions
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;