summaryrefslogtreecommitdiff
path: root/editor/plugins
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-08-31 22:08:37 +0200
committerGitHub <noreply@github.com>2019-08-31 22:08:37 +0200
commit7cf58a7f667e75862b8e3f2502aad3cfee8b3b0f (patch)
tree6f100a84e2bed7507ea625acbf7223ff33c0753a /editor/plugins
parentb17b51d9701459d43da7c6766642762649802ff0 (diff)
parent2cd2197362d88dd582539525cf7ea59b391c0438 (diff)
Merge pull request #31808 from qarmin/crash_audioogg
Fix crash when AudioStreamOGGVorbis is empty
Diffstat (limited to 'editor/plugins')
-rw-r--r--editor/plugins/editor_preview_plugins.cpp1
1 files changed, 1 insertions, 0 deletions
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<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) {