mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-09-24 23:31:36 +08:00
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:
committed by
Ryan Foster
parent
754a46d43f
commit
2b53fe0e65
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user