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
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6

View File

@ -455,8 +455,11 @@ 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);
// Disable context menu on tray icon if(trayIconMenu)
trayIconMenu->clear(); {
// Disable context menu on tray icon
trayIconMenu->clear();
}
} }
} }