File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -352,6 +352,17 @@ void BitcoinApplication::requestShutdown()
352
352
window->setClientModel (nullptr );
353
353
pollShutdownTimer->stop ();
354
354
355
+ #ifdef ENABLE_WALLET
356
+ // Delete wallet controller here manually, instead of relying on Qt object
357
+ // tracking (https://doc.qt.io/qt-5/objecttrees.html). This makes sure
358
+ // walletmodel m_handle_* notification handlers are deleted before wallets
359
+ // are unloaded, which can simplify wallet implementations. It also avoids
360
+ // these notifications having to be handled while GUI objects are being
361
+ // destroyed, making GUI code less fragile as well.
362
+ delete m_wallet_controller;
363
+ m_wallet_controller = nullptr ;
364
+ #endif // ENABLE_WALLET
365
+
355
366
delete clientModel;
356
367
clientModel = nullptr ;
357
368
You can’t perform that action at this time.
0 commit comments