Fix crash when shutting down and clicked on system tray icon

Disconnect all signals of system tray icon when shutting down.

Closes #16324.
PR #16328.
This commit is contained in:
Chocobo1
2022-01-31 11:54:44 +08:00
parent 48ff494dca
commit 6790335239

View File

@@ -1235,6 +1235,7 @@ void MainWindow::closeEvent(QCloseEvent *e)
#ifndef Q_OS_MACOS
if (m_systrayIcon)
{
m_systrayIcon->disconnect();
m_systrayIcon->setToolTip(tr("qBittorrent is shutting down..."));
m_trayIconMenu->setEnabled(false);
}