From 0acf8343bb1af8bd185d7767dd622e428885e6e4 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Fri, 9 Aug 2024 08:08:32 -0700 Subject: [PATCH] Fixed crash if pipewire doesn't detect any devices and doesn't end up being used. Fixes https://github.com/libsdl-org/SDL/issues/10511 --- src/audio/pipewire/SDL_pipewire.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/audio/pipewire/SDL_pipewire.c b/src/audio/pipewire/SDL_pipewire.c index c22269c8c0..251b324a38 100644 --- a/src/audio/pipewire/SDL_pipewire.c +++ b/src/audio/pipewire/SDL_pipewire.c @@ -1269,6 +1269,7 @@ static SDL_bool PIPEWIRE_PREFERRED_Init(SDL_AudioDriverImpl *impl) PIPEWIRE_pw_thread_loop_unlock(hotplug_loop); if (no_devices || !pipewire_core_version_at_least(1, 0, 0)) { + hotplug_loop_destroy(); PIPEWIRE_Deinitialize(); return SDL_FALSE; }