From 4d000ae3bd56decc999ef4ad62701ed07dbd56bf Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Tue, 20 Feb 2024 15:29:07 -0500 Subject: [PATCH] audio: Change references to `streams[i]` to previously-calculated `stream`. Reference PR #9096. --- src/audio/SDL_audio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/audio/SDL_audio.c b/src/audio/SDL_audio.c index 453d73702..60fdde704 100644 --- a/src/audio/SDL_audio.c +++ b/src/audio/SDL_audio.c @@ -1795,8 +1795,8 @@ int SDL_BindAudioStreams(SDL_AudioDeviceID devid, SDL_AudioStream **streams, int for (j = 0; j < i; j++) { SDL_UnlockMutex(streams[j]->lock); } - if (streams[i]) { - SDL_UnlockMutex(streams[i]->lock); + if (stream) { + SDL_UnlockMutex(stream->lock); } break; }