3
0
Fork 0
forked from mirrors/nixpkgs

obs-studio: 18.0.0 -> 18.0.1

also add patch to fix a segfault, submitted upstream to obs-studio
This commit is contained in:
Cray Elliott 2017-03-10 04:10:42 -08:00
parent 1873721fcd
commit 76836ee2c7
2 changed files with 44 additions and 2 deletions

View file

@ -22,15 +22,17 @@ let
optional = stdenv.lib.optional;
in stdenv.mkDerivation rec {
name = "obs-studio-${version}";
version = "18.0.0";
version = "18.0.1";
src = fetchFromGitHub {
owner = "jp9000";
repo = "obs-studio";
rev = "${version}";
sha256 = "0qjv1l69ca8l8jihpkz7yln7gr7168k8c7yxgd8y23dp1db9hdrm";
sha256 = "0mvjmkq5zlcppjqy18933w7r7rz1mpr2jpf8ipd0famdlgyacix6";
};
patches = [ ./segfault-patch-systray.patch ];
nativeBuildInputs = [ cmake
];

View file

@ -0,0 +1,40 @@
From c31e0f682431508ccd2d3c0f74e6e16fc71445d8 Mon Sep 17 00:00:00 2001
From: Cray Elliott <MP2E@archlinux.us>
Date: Fri, 10 Mar 2017 03:48:36 -0800
Subject: [PATCH] Fix segfault in Linux when no system tray exists
previously, switching workspaces while obs-studio is running resulted in a
segfault if no system tray was available
---
UI/window-basic-main.cpp | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/UI/window-basic-main.cpp b/UI/window-basic-main.cpp
index 8590dd75..024854d6 100644
--- a/UI/window-basic-main.cpp
+++ b/UI/window-basic-main.cpp
@@ -2916,13 +2916,15 @@ void OBSBasic::closeEvent(QCloseEvent *event)
void OBSBasic::changeEvent(QEvent *event)
{
- if (event->type() == QEvent::WindowStateChange &&
- isMinimized() &&
- trayIcon->isVisible() &&
- sysTrayMinimizeToTray()) {
-
- ToggleShowHide();
- }
+ if (trayIcon) {
+ if (event->type() == QEvent::WindowStateChange &&
+ isMinimized() &&
+ trayIcon->isVisible() &&
+ sysTrayMinimizeToTray()) {
+
+ ToggleShowHide();
+ }
+ }
}
void OBSBasic::on_actionShow_Recordings_triggered()
--
2.12.0