Merge pull request #31808 from qarmin/crash_audioogg

Fix crash when AudioStreamOGGVorbis is empty
This commit is contained in:
Rémi Verschelde 2019-08-31 22:08:37 +02:00 committed by GitHub
commit 7cf58a7f66
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -624,6 +624,7 @@ Ref<Texture> EditorAudioStreamPreviewPlugin::generate(const RES &p_from, const S
uint8_t *imgw = imgdata.ptr();
Ref<AudioStreamPlayback> playback = stream->instance_playback();
ERR_FAIL_COND_V(playback.is_null(), Ref<Texture>());
float len_s = stream->get_length();
if (len_s == 0) {