Check correct variable for malloc() results.

This commit is contained in:
Ryan C. Gordon 2017-10-18 23:49:46 -04:00
parent afefcbfeba
commit e98920f5f3
1 changed files with 1 additions and 1 deletions

View File

@ -1299,7 +1299,7 @@ SDL_NewAudioStream(const SDL_AudioFormat src_format,
retval->staging_buffer_size = ((retval->resampler_padding_samples / retval->pre_resample_channels) * retval->src_sample_frame_size);
if (retval->staging_buffer_size > 0) {
retval->staging_buffer = (Uint8 *) SDL_malloc(retval->staging_buffer_size);
if (retval->resampler_padding == NULL) {
if (retval->staging_buffer == NULL) {
SDL_FreeAudioStream(retval);
SDL_OutOfMemory();
return NULL;