diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2018-08-22 14:07:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-22 14:07:09 +0200 |
commit | a097fdfab12a94dbdb2bc79b2d64abf638006954 (patch) | |
tree | d684430b7866c6238f414a3fdf12fae9dc98665a | |
parent | 3573d5f4ae9bddd063a6b74c9be9b44cd2780708 (diff) | |
parent | a327a0078b3d78657ccd06a3f5d567f68212ee28 (diff) |
Merge pull request #21287 from Noshyaar/preview-crash
Fix crash when previewing null AudioStream
-rw-r--r-- | editor/audio_stream_preview.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/editor/audio_stream_preview.cpp b/editor/audio_stream_preview.cpp index 6ae5ec43a9..6e6a7d7935 100644 --- a/editor/audio_stream_preview.cpp +++ b/editor/audio_stream_preview.cpp @@ -169,7 +169,8 @@ Ref<AudioStreamPreview> AudioStreamPreviewGenerator::generate_preview(const Ref< preview->preview->preview = maxmin; preview->preview->length = len_s; - preview->thread = Thread::create(_preview_thread, preview); + if (preview->playback.is_valid()) + preview->thread = Thread::create(_preview_thread, preview); return preview->preview; } |