VSE: Fix crash when building proxy

When video file for strip doesn't exist, building crashes on NULL
dereference.

This check was removed by 04e1feb830.
This commit is contained in:
Richard Antalik 2021-04-08 18:51:47 +02:00
parent a19aa090d2
commit 8777a44ccb
1 changed files with 8 additions and 6 deletions

View File

@ -466,12 +466,14 @@ bool SEQ_proxy_rebuild_context(Main *bmain,
seq_open_anim_file(scene, nseq, true);
sanim = BLI_findlink(&nseq->anims, i);
context->index_context = IMB_anim_index_rebuild_context(sanim->anim,
context->tc_flags,
context->size_flags,
context->quality,
context->overwrite,
file_list);
if (sanim->anim) {
context->index_context = IMB_anim_index_rebuild_context(sanim->anim,
context->tc_flags,
context->size_flags,
context->quality,
context->overwrite,
file_list);
}
if (!context->index_context) {
MEM_freeN(context);
return false;