You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-13 13:31:48 +00:00
Fix crash when AudioStreamOGGVorbis is empty
This commit is contained in:
@@ -624,6 +624,7 @@ Ref<Texture> EditorAudioStreamPreviewPlugin::generate(const RES &p_from, const S
|
|||||||
uint8_t *imgw = imgdata.ptr();
|
uint8_t *imgw = imgdata.ptr();
|
||||||
|
|
||||||
Ref<AudioStreamPlayback> playback = stream->instance_playback();
|
Ref<AudioStreamPlayback> playback = stream->instance_playback();
|
||||||
|
ERR_FAIL_COND_V(playback.is_null(), Ref<Texture>());
|
||||||
|
|
||||||
float len_s = stream->get_length();
|
float len_s = stream->get_length();
|
||||||
if (len_s == 0) {
|
if (len_s == 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user