Skip to content

Commit 60e190c

Browse files
committed
gui: Fix WalletController deletion
The wallet controller instanced must be deleted after the window instance since it is used there.
1 parent 2fbf6a5 commit 60e190c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/qt/bitcoin.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,8 @@ BitcoinApplication::~BitcoinApplication()
218218
#ifdef ENABLE_WALLET
219219
delete paymentServer;
220220
paymentServer = nullptr;
221+
delete m_wallet_controller;
222+
m_wallet_controller = nullptr;
221223
#endif
222224
delete optionsModel;
223225
optionsModel = nullptr;
@@ -310,10 +312,6 @@ void BitcoinApplication::requestShutdown()
310312
window->setClientModel(nullptr);
311313
pollShutdownTimer->stop();
312314

313-
#ifdef ENABLE_WALLET
314-
delete m_wallet_controller;
315-
m_wallet_controller = nullptr;
316-
#endif
317315
delete clientModel;
318316
clientModel = nullptr;
319317

0 commit comments

Comments
 (0)