diff options
author | Richard Antalik <richardantalik@gmail.com> | 2022-05-17 22:08:49 +0300 |
---|---|---|
committer | Richard Antalik <richardantalik@gmail.com> | 2022-05-17 22:22:21 +0300 |
commit | 35e73aa3472ab8c1e28feec1829fae79967322b5 (patch) | |
tree | 142ccb43c30bffb4118baa474c7abe3efc654928 /source/blender/sequencer/intern | |
parent | b48adbc9d79c55b8dac368865098b34c7536d74f (diff) |
Fix T98021: Crash when using scene strip as sequencer input
Issue was caused by treating such strip as meta and using
`seq->channels` directly, which is not valid for scene strips.
Pointer to channels is now provided by function
`SEQ_get_seqbase_from_sequence`.
Diffstat (limited to 'source/blender/sequencer/intern')
-rw-r--r-- | source/blender/sequencer/intern/render.c | 4 | ||||
-rw-r--r-- | source/blender/sequencer/intern/utils.c | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/sequencer/intern/render.c b/source/blender/sequencer/intern/render.c index 8d8a13be09e..1b9e89a35d5 100644 --- a/source/blender/sequencer/intern/render.c +++ b/source/blender/sequencer/intern/render.c @@ -1586,10 +1586,10 @@ static ImBuf *do_render_strip_seqbase(const SeqRenderData *context, { ImBuf *ibuf = NULL; ListBase *seqbase = NULL; - ListBase *channels = &seq->channels; + ListBase *channels = NULL; int offset; - seqbase = SEQ_get_seqbase_from_sequence(seq, &offset); + seqbase = SEQ_get_seqbase_from_sequence(seq, &channels, &offset); if (seqbase && !BLI_listbase_is_empty(seqbase)) { diff --git a/source/blender/sequencer/intern/utils.c b/source/blender/sequencer/intern/utils.c index da422c4228f..0cf47420d8f 100644 --- a/source/blender/sequencer/intern/utils.c +++ b/source/blender/sequencer/intern/utils.c @@ -225,13 +225,14 @@ const char *SEQ_sequence_give_name(Sequence *seq) return name; } -ListBase *SEQ_get_seqbase_from_sequence(Sequence *seq, int *r_offset) +ListBase *SEQ_get_seqbase_from_sequence(Sequence *seq, ListBase **r_channels, int *r_offset) { ListBase *seqbase = NULL; switch (seq->type) { case SEQ_TYPE_META: { seqbase = &seq->seqbase; + *r_channels = &seq->channels; *r_offset = seq->start; break; } @@ -240,6 +241,7 @@ ListBase *SEQ_get_seqbase_from_sequence(Sequence *seq, int *r_offset) Editing *ed = SEQ_editing_get(seq->scene); if (ed) { seqbase = &ed->seqbase; + *r_channels = &ed->channels; *r_offset = seq->scene->r.sfra; } } |