From 73b5476681dbd8bb383a306a318ca8b937011d0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Via=C4=8Das=C5=82a=C5=AD=20Chalikin?= Date: Tue, 7 Jan 2025 14:37:04 +0300 Subject: [PATCH] Fix launch app when pipewire service is stopped --- audio/common/pipewire.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/audio/common/pipewire.c b/audio/common/pipewire.c index be05b221bf8..3dcf25460d8 100644 --- a/audio/common/pipewire.c +++ b/audio/common/pipewire.c @@ -162,13 +162,17 @@ bool pipewire_core_init(pipewire_core_t *pw, const char *loop_name) pw_thread_loop_lock(pw->thread_loop); pw->core = pw_context_connect(pw->ctx, NULL, 0); - if(!pw->core) - return false; + if (!pw->core) + goto unlock; if (pw_core_add_listener(pw->core, &pw->core_listener, &core_events, pw) < 0) - return false; + goto unlock; return true; + +unlock: + pw_thread_loop_unlock(pw->thread_loop); + return false; }