Преглед изворни кода

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

Reference PR #9096.
Ryan C. Gordon пре 2 година
родитељ
комит
4d000ae3bd
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      src/audio/SDL_audio.c

+ 2 - 2
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;
             }