diff --git a/src/gui/MainWindow.cpp b/src/gui/MainWindow.cpp index 9a06ac893..cf26f1818 100644 --- a/src/gui/MainWindow.cpp +++ b/src/gui/MainWindow.cpp @@ -446,7 +446,8 @@ void MainWindow::closeEvent(QCloseEvent* event) void MainWindow::changeEvent(QEvent *event) { if ((event->type() == QEvent::WindowStateChange) && isMinimized() - && isTrayIconEnabled() && config()->get("GUI/MinimizeToTray").toBool()) + && isTrayIconEnabled() && m_trayIcon && m_trayIcon->isVisible() + && config()->get("GUI/MinimizeToTray").toBool()) { event->ignore(); QTimer::singleShot(0, this, SLOT(hide()));