Fix segfault crash when shutdown the GUI in disablewallet mode

This commit is contained in:
Jonas Schnelli 2017-02-21 14:36:36 +01:00
parent 8ad31f9aa3
commit 312c4f1057
No known key found for this signature in database
GPG Key ID: 29D4BCB6416F53EC
1 changed files with 4 additions and 1 deletions

View File

@ -518,7 +518,10 @@ void BitcoinGUI::setClientModel(ClientModel *_clientModel)
// Propagate cleared model to child objects
rpcConsole->setClientModel(nullptr);
#ifdef ENABLE_WALLET
walletFrame->setClientModel(nullptr);
if (walletFrame)
{
walletFrame->setClientModel(nullptr);
}
#endif // ENABLE_WALLET
unitDisplayControl->setOptionsModel(nullptr);
}