audio: Change references to streams[i] to previously-calculated stream.

Reference PR #9096.
This commit is contained in:
Ryan C. Gordon 2024-02-20 15:29:07 -05:00
parent 751917cb6f
commit 4d000ae3bd
No known key found for this signature in database
GPG Key ID: FA148B892AB48044

View File

@ -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;
}