@@ -0,0 +1,40 @@
1+From c31e0f682431508ccd2d3c0f74e6e16fc71445d8 Mon Sep 17 00:00:00 2001
2+From: Cray Elliott <MP2E@archlinux.us>
3+Date: Fri, 10 Mar 2017 03:48:36 -0800
4+Subject: [PATCH] Fix segfault in Linux when no system tray exists
5+
6+previously, switching workspaces while obs-studio is running resulted in a
7+segfault if no system tray was available
8+---
9+ UI/window-basic-main.cpp | 16 +++++++++-------
10+ 1 file changed, 9 insertions(+), 7 deletions(-)
11+
12+diff --git a/UI/window-basic-main.cpp b/UI/window-basic-main.cpp
13+index 8590dd75..024854d6 100644
14+--- a/UI/window-basic-main.cpp
15++++ b/UI/window-basic-main.cpp
16+@@ -2916,13 +2916,15 @@ void OBSBasic::closeEvent(QCloseEvent *event)
17+
18+ void OBSBasic::changeEvent(QEvent *event)
19+ {
20+- if (event->type() == QEvent::WindowStateChange &&
21+- isMinimized() &&
22+- trayIcon->isVisible() &&
23+- sysTrayMinimizeToTray()) {
24+-
25+- ToggleShowHide();
26+- }
27++ if (trayIcon) {
28++ if (event->type() == QEvent::WindowStateChange &&
29++ isMinimized() &&
30++ trayIcon->isVisible() &&
31++ sysTrayMinimizeToTray()) {
32++
33++ ToggleShowHide();
34++ }
35++ }
36+ }
37+
38+ void OBSBasic::on_actionShow_Recordings_triggered()
39+--
40+2.12.0