Fix T103601: Crash on making Contactsheet

Python API for moving strips to and from meta strips did not invalidate
strip lookup cache. Because of that, `SEQ_get_seqbase_by_seq()` failed
to lookup origin of strip, which resulted in crash on NULL dereference.

Invalidateion was added to functions `SEQ_edit_move_strip_to_meta()` and
`SEQ_add_meta_strip()`.
This commit is contained in:
Richard Antalik 2023-01-03 06:19:02 +01:00
parent 896ad9d5d0
commit 2e0cf17f94
2 changed files with 5 additions and 1 deletions

View File

@ -22,7 +22,7 @@
#ifdef RNA_RUNTIME
//#include "DNA_anim_types.h"
// #include "DNA_anim_types.h"
# include "DNA_image_types.h"
# include "DNA_mask_types.h"
# include "DNA_sound_types.h"
@ -83,6 +83,8 @@ static void rna_Sequences_move_strip_to_meta(
DEG_relations_tag_update(bmain);
DEG_id_tag_update(&scene->id, ID_RECALC_SEQUENCER_STRIPS);
SEQ_sequence_lookup_tag(scene, SEQ_LOOKUP_TAG_INVALID);
WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, scene);
}

View File

@ -367,6 +367,8 @@ Sequence *SEQ_add_meta_strip(Scene *scene, ListBase *seqbase, SeqLoadData *load_
seqm->start = load_data->start_frame;
seqm->len = 1;
seq_add_generic_update(scene, seqm);
return seqm;
}