Merge pull request #21287 from Noshyaar/preview-crash
Fix crash when previewing null AudioStream
This commit is contained in:
commit
a097fdfab1
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue