diff --git a/modules/minimp3/audio_stream_mp3.cpp b/modules/minimp3/audio_stream_mp3.cpp index a73381ae578..b37318927c5 100644 --- a/modules/minimp3/audio_stream_mp3.cpp +++ b/modules/minimp3/audio_stream_mp3.cpp @@ -159,7 +159,8 @@ void AudioStreamMP3::set_data(const PoolVector &p_data) { PoolVector::Read src_datar = p_data.read(); mp3dec_ex_t mp3d; - mp3dec_ex_open_buf(&mp3d, src_datar.ptr(), src_data_len, MP3D_SEEK_TO_SAMPLE); + int err = mp3dec_ex_open_buf(&mp3d, src_datar.ptr(), src_data_len, MP3D_SEEK_TO_SAMPLE); + ERR_FAIL_COND(err != 0); channels = mp3d.info.channels; sample_rate = mp3d.info.hz;