frontend: Fix QSystemTrayIcon and QMenu delete order

QSystemTrayIcon holds a non-owning pointer to the QMenu, so it needs to
be deleted first.

Fixes: #12948
This commit is contained in:
Hoshino Lina
2026-01-12 17:48:14 -05:00
committed by Ryan Foster
parent 754a46d43f
commit 2b53fe0e65
3 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -29,7 +29,7 @@ void OBSBasic::SystemTrayInit()
#else
QIcon trayIconFile = QIcon(":/res/images/obs.png");
#endif
trayIcon.reset(new QSystemTrayIcon(QIcon::fromTheme("obs-tray", trayIconFile), this));
trayIcon = new QSystemTrayIcon(QIcon::fromTheme("obs-tray", trayIconFile), this);
trayIcon->setToolTip("OBS Studio");
showHide = new QAction(QTStr("Basic.SystemTray.Show"), trayIcon.data());