diff --git a/src/audio/SDL_audiocvt.c b/src/audio/SDL_audiocvt.c index 58f763b1c..7bc3ffea1 100644 --- a/src/audio/SDL_audiocvt.c +++ b/src/audio/SDL_audiocvt.c @@ -998,7 +998,9 @@ SDL_AudioStreamClear(SDL_AudioStream *stream) SDL_InvalidParamError("stream"); } else { SDL_ClearDataQueue(stream->queue, stream->packetlen * 2); - stream->reset_resampler_func(stream); + if (stream->reset_resampler_func) { + stream->reset_resampler_func(stream); + } } }