Skip to content

Commit

Permalink
Check correct variable for malloc() results.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Oct 19, 2017
1 parent afefcbf commit e98920f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/audio/SDL_audiocvt.c
Expand Up @@ -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;
Expand Down

0 comments on commit e98920f

Please sign in to comment.