mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-06 06:34:35 +00:00
SDL_LoadWAV_IO(): On error, set *audio_buf to NULL and *audio_len to 0
This commit is contained in:
parent
faf3bd9991
commit
23e08f7807
1 changed files with 2 additions and 2 deletions
|
|
@ -2114,8 +2114,8 @@ bool SDL_LoadWAV_IO(SDL_IOStream *src, bool closeio, SDL_AudioSpec *spec, Uint8
|
|||
result = WaveLoad(src, &file, spec, audio_buf, audio_len);
|
||||
if (!result) {
|
||||
SDL_free(*audio_buf);
|
||||
audio_buf = NULL;
|
||||
audio_len = 0;
|
||||
*audio_buf = NULL;
|
||||
*audio_len = 0;
|
||||
}
|
||||
|
||||
// Cleanup
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue