Commit: 1395ba70bf37bc0a21920416b0abbaac9af2b7e5 Author: Richard Antalik Date: Thu Nov 19 13:10:42 2020 +0100 Branches: master https://developer.blender.org/rB1395ba70bf37bc0a21920416b0abbaac9af2b7e5
Fix crash when adding strip using RNA API call Don't allocate StripElem for movieclip, scene and mask strips. This struct is not handled in seq_dupli function. This caused field to be uninitialized in COW datablock. StripElem is not allocated when adding strip with operator and it is not needed for these strip types. Reviewed By: sergey Differential Revision: https://developer.blender.org/D9600 =================================================================== M source/blender/makesrna/intern/rna_sequencer_api.c =================================================================== diff --git a/source/blender/makesrna/intern/rna_sequencer_api.c b/source/blender/makesrna/intern/rna_sequencer_api.c index 9b8386dd1b1..5419fc4ac7c 100644 --- a/source/blender/makesrna/intern/rna_sequencer_api.c +++ b/source/blender/makesrna/intern/rna_sequencer_api.c @@ -89,7 +89,9 @@ static Sequence *alloc_generic_sequence( Strip *strip = seq->strip; - if (file) { + /* Don't allocate StripElem for clip, mask and scene types. This struct is not handled in + * seq_dupli() function. */ + if (file && !ELEM(type, SEQ_TYPE_MOVIECLIP, SEQ_TYPE_MASK, SEQ_TYPE_SCENE)) { strip->stripdata = se = MEM_callocN(sizeof(StripElem), "stripelem"); BLI_split_dirfile(file, strip->dir, se->name, sizeof(strip->dir), sizeof(se->name)); _______________________________________________ Bf-blender-cvs mailing list [email protected] https://lists.blender.org/mailman/listinfo/bf-blender-cvs
