Fix crash when tray icon is disabled on macOS

This commit is contained in:
Ilya Fedin 2020-02-11 10:40:50 +04:00 committed by John Preston
parent 4fececb94f
commit 5171c0bd77

View file

@ -555,8 +555,8 @@ void MainWindow::psTrayMenuUpdated() {
&& trayIcon->contextMenu() != trayIconMenu) {
trayIcon->setContextMenu(trayIconMenu);
}
} else {
trayIcon->setContextMenu(0);
} else if (trayIcon) {
trayIcon->setContextMenu(nullptr);
}
}