qt: Prevent thread/memory leak on exiting RPCConsole

This commit is contained in:
Wladimir J. van der Laan
2016-11-18 16:35:14 +01:00
committed by lateminer
parent e059dd192b
commit b72d6e77e8
3 changed files with 24 additions and 11 deletions

View File

@@ -527,6 +527,13 @@ void BitcoinGUI::setClientModel(ClientModel *clientModel)
// Disable context menu on tray icon
trayIconMenu->clear();
}
// Propagate cleared model to child objects
rpcConsole->setClientModel(nullptr);
#ifdef ENABLE_WALLET
walletFrame->setClientModel(nullptr);
#endif // ENABLE_WALLET
unitDisplayControl->setOptionsModel(nullptr);
connectionsControl->setClientModel(nullptr);
}
}