[Bf-blender-cvs] [2e0cf17f94d] master: Fix T103601: Crash on making Contactsheet
Richard Antalik
noreply at git.blender.org
Tue Jan 3 06:35:14 CET 2023
Commit: 2e0cf17f94dcf6dc10f0d55d933c011534dc8421
Author: Richard Antalik
Date: Tue Jan 3 06:19:02 2023 +0100
Branches: master
https://developer.blender.org/rB2e0cf17f94dcf6dc10f0d55d933c011534dc8421
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()`.
===================================================================
M source/blender/makesrna/intern/rna_sequencer_api.c
M source/blender/sequencer/intern/strip_add.c
===================================================================
diff --git a/source/blender/makesrna/intern/rna_sequencer_api.c b/source/blender/makesrna/intern/rna_sequencer_api.c
index ae241c11522..e1ccffdd2c1 100644
--- a/source/blender/makesrna/intern/rna_sequencer_api.c
+++ b/source/blender/makesrna/intern/rna_sequencer_api.c
@@ -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);
}
diff --git a/source/blender/sequencer/intern/strip_add.c b/source/blender/sequencer/intern/strip_add.c
index d98a00aa9a5..7744bc4ce1c 100644
--- a/source/blender/sequencer/intern/strip_add.c
+++ b/source/blender/sequencer/intern/strip_add.c
@@ -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;
}
More information about the Bf-blender-cvs
mailing list