qt: Add null check in setClientModel(0)

Don't clear tray icon menu if it was never created.
Necessary precaution after #4649.
This commit is contained in:
Wladimir J. van der Laan
2014-08-26 17:44:57 +02:00
parent d49b0876a4
commit f30801afbd

View File

@@ -455,10 +455,13 @@ void BitcoinGUI::setClientModel(ClientModel *clientModel)
} else { } else {
// Disable possibility to show main window via action // Disable possibility to show main window via action
toggleHideAction->setEnabled(false); toggleHideAction->setEnabled(false);
if(trayIconMenu)
{
// Disable context menu on tray icon // Disable context menu on tray icon
trayIconMenu->clear(); trayIconMenu->clear();
} }
} }
}
#ifdef ENABLE_WALLET #ifdef ENABLE_WALLET
bool BitcoinGUI::addWallet(const QString& name, WalletModel *walletModel) bool BitcoinGUI::addWallet(const QString& name, WalletModel *walletModel)