Skip to content

Commit

Permalink
gui: Fix WalletController deletion
Browse files Browse the repository at this point in the history
The wallet controller instanced must be deleted after the window instance
since it is used there.
  • Loading branch information
promag committed Feb 3, 2019
1 parent 2fbf6a5 commit 60e190c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/qt/bitcoin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit 60e190c

Please sign in to comment.