diff --git a/modules/minimp3/audio_stream_mp3.cpp b/modules/minimp3/audio_stream_mp3.cpp index 392a2fb565a..8627f71987e 100644 --- a/modules/minimp3/audio_stream_mp3.cpp +++ b/modules/minimp3/audio_stream_mp3.cpp @@ -120,7 +120,10 @@ AudioStreamPlaybackMP3::~AudioStreamPlaybackMP3() { Ref AudioStreamMP3::instance_playback() { Ref mp3s; - ERR_FAIL_COND_V(data == nullptr, mp3s); + ERR_FAIL_COND_V_MSG(data == nullptr, mp3s, + "This AudioStreamMP3 does not have an audio file assigned " + "to it. AudioStreamMP3 should not be created from the " + "inspector or with `.new()`. Instead, load an audio file."); mp3s.instance(); mp3s->mp3_stream = Ref(this); diff --git a/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp b/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp index 82d1206e937..4b2be47e74d 100644 --- a/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp +++ b/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp @@ -124,7 +124,10 @@ AudioStreamPlaybackOGGVorbis::~AudioStreamPlaybackOGGVorbis() { Ref AudioStreamOGGVorbis::instance_playback() { Ref ovs; - ERR_FAIL_COND_V(data == nullptr, ovs); + ERR_FAIL_COND_V_MSG(data == nullptr, ovs, + "This AudioStreamOGGVorbis does not have an audio file assigned " + "to it. AudioStreamOGGVorbis should not be created from the " + "inspector or with `.new()`. Instead, load an audio file."); ovs.instance(); ovs->vorbis_stream = Ref(this);