From a2c44dedce3675e661c88a31b91e6267a62f74ec Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Mon, 31 Jan 2022 11:54:44 +0800 Subject: [PATCH] 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. --- src/gui/mainwindow.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gui/mainwindow.cpp b/src/gui/mainwindow.cpp index 00eaf82f9..637bc22c1 100644 --- a/src/gui/mainwindow.cpp +++ b/src/gui/mainwindow.cpp @@ -1236,6 +1236,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); }