From c7a44eea8369c92c964172f8707758d10d577724 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" <[EMAIL REDACTED]>
Date: Thu, 22 Jun 2023 18:31:33 -0400
Subject: [PATCH] audio: Fixed logic error.
---
src/audio/SDL_audio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/audio/SDL_audio.c b/src/audio/SDL_audio.c
index 19624b8ba271..76b36f8e4742 100644
--- a/src/audio/SDL_audio.c
+++ b/src/audio/SDL_audio.c
@@ -335,7 +335,7 @@ void SDL_AudioDeviceDisconnected(SDL_AudioDevice *device)
SDL_AtomicSet(&device->shutdown, 1); // tell audio thread to terminate.
// if there's an audio thread, don't free until thread is terminating, otherwise free stuff now.
- const SDL_bool should_destroy = (device->thread != NULL);
+ const SDL_bool should_destroy = (device->thread == NULL);
SDL_UnlockMutex(device->lock);
// Post the event, if we haven't tried to before and if it's desired