Explorar o código

UI: Check for valid systen tray pointer

Fixes a potential crash that can happen if the system tray is not
initialized for whatever reason.
jp9000 %!s(int64=6) %!d(string=hai) anos
pai
achega
767d534409
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      UI/window-basic-main.cpp

+ 2 - 0
UI/window-basic-main.cpp

@@ -6866,6 +6866,8 @@ void OBSBasic::SystemTray(bool firstStarted)
 {
 	if (!QSystemTrayIcon::isSystemTrayAvailable())
 		return;
+	if (!trayIcon)
+		return;
 
 	bool sysTrayWhenStarted = config_get_bool(GetGlobalConfig(),
 			"BasicWindow", "SysTrayWhenStarted");