audio: Fix audio stream incorrectly not unlocking during unbind.

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

Fixes #9379.
main
Ryan C. Gordon 2024-03-27 17:36:26 -04:00
parent 38e3c6a4aa
commit d00ccc1546
No known key found for this signature in database
GPG Key ID: FA148B892AB48044
1 changed files with 1 additions and 1 deletions

View File

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