mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-06 06:34:35 +00:00
Don't leave garbage in output parameters
This commit is contained in:
parent
cd15893ea3
commit
c663b6ec1f
1 changed files with 6 additions and 0 deletions
|
|
@ -531,6 +531,12 @@ bool SDL_UnlockAudioStream(SDL_AudioStream *stream)
|
|||
bool SDL_GetAudioStreamFormat(SDL_AudioStream *stream, SDL_AudioSpec *src_spec, SDL_AudioSpec *dst_spec)
|
||||
{
|
||||
if (!stream) {
|
||||
if (src_spec) {
|
||||
SDL_zerop(src_spec);
|
||||
}
|
||||
if (dst_spec) {
|
||||
SDL_zerop(dst_spec);
|
||||
}
|
||||
return SDL_InvalidParamError("stream");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue