From 2cd2197362d88dd582539525cf7ea59b391c0438 Mon Sep 17 00:00:00 2001 From: qarmin Date: Fri, 30 Aug 2019 20:01:14 +0200 Subject: Fix crash when AudioStreamOGGVorbis is empty --- editor/plugins/editor_preview_plugins.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'editor/plugins') diff --git a/editor/plugins/editor_preview_plugins.cpp b/editor/plugins/editor_preview_plugins.cpp index c8ffc2744a..8acc41a2c7 100644 --- a/editor/plugins/editor_preview_plugins.cpp +++ b/editor/plugins/editor_preview_plugins.cpp @@ -624,6 +624,7 @@ Ref EditorAudioStreamPreviewPlugin::generate(const RES &p_from, const S uint8_t *imgw = imgdata.ptr(); Ref playback = stream->instance_playback(); + ERR_FAIL_COND_V(playback.is_null(), Ref()); float len_s = stream->get_length(); if (len_s == 0) { -- cgit v1.2.3