Skip to content

Commit

Permalink
audio_driver_sample - fix potential crash
Browse files Browse the repository at this point in the history
  • Loading branch information
LibretroAdmin committed Nov 18, 2024
1 parent 564dac4 commit 62fd7e1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions audio/audio_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -814,6 +814,8 @@ void audio_driver_sample(int16_t left, int16_t right)
uint32_t runloop_flags;
audio_driver_state_t *audio_st = &audio_driver_st;
recording_state_t *recording_st = NULL;
if (!audio_st || !audio_st->output_samples_conv_buf)
return;
if (audio_st->flags & AUDIO_FLAG_SUSPENDED)
return;
audio_st->output_samples_conv_buf[audio_st->data_ptr++] = left;
Expand Down

0 comments on commit 62fd7e1

Please sign in to comment.