Browse Source

audio: Fix audio stream incorrectly not unlocking during unbind.

(This patch was from @0x1F9F1, thanks!)

Fixes #9379.
Ryan C. Gordon 1 year ago
parent
commit
d00ccc1546
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/audio/SDL_audio.c

+ 1 - 1
src/audio/SDL_audio.c

@@ -1903,7 +1903,7 @@ void SDL_UnbindAudioStreams(SDL_AudioStream **streams, int num_streams)
     // Finalize and unlock everything.
     for (int i = 0; i < num_streams; i++) {
         SDL_AudioStream *stream = streams[i];
-        if (stream && stream->bound_device) {
+        if (stream) {
             SDL_LogicalAudioDevice *logdev = stream->bound_device;
             stream->bound_device = NULL;
             SDL_UnlockMutex(stream->lock);