Skip to content

Commit 23e08f7

Browse files
Sackzementicculus
authored andcommitted
SDL_LoadWAV_IO(): On error, set *audio_buf to NULL and *audio_len to 0
1 parent faf3bd9 commit 23e08f7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/audio/SDL_wave.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2114,8 +2114,8 @@ bool SDL_LoadWAV_IO(SDL_IOStream *src, bool closeio, SDL_AudioSpec *spec, Uint8
21142114
result = WaveLoad(src, &file, spec, audio_buf, audio_len);
21152115
if (!result) {
21162116
SDL_free(*audio_buf);
2117-
audio_buf = NULL;
2118-
audio_len = 0;
2117+
*audio_buf = NULL;
2118+
*audio_len = 0;
21192119
}
21202120

21212121
// Cleanup

0 commit comments

Comments
 (0)