audio: Don't call a NULL function pointer when clearing audio streams.

(Partially?) fixes Bugzilla #3547.
This commit is contained in:
Ryan C. Gordon 2017-01-06 21:23:51 -05:00
parent c1ac4c6835
commit c5825b698d
1 changed files with 3 additions and 1 deletions

View File

@ -998,8 +998,10 @@ SDL_AudioStreamClear(SDL_AudioStream *stream)
SDL_InvalidParamError("stream");
} else {
SDL_ClearDataQueue(stream->queue, stream->packetlen * 2);
if (stream->reset_resampler_func) {
stream->reset_resampler_func(stream);
}
}
}