VSE: Implement sanity check for files with more channels than supported
This is a follow up to 8fecc2a852
.
This makes sure future .blend files that have more channels than the
limit won't break Blender.
For LTS this happens silently, without warning the users.
This is part of https://developer.blender.org/D12645
Differential Revision: https://developer.blender.org/D12648
This commit is contained in:
parent
5d8a7ba7de
commit
aaa85ad2e0
Notes:
blender-bot
2023-02-14 11:20:29 +01:00
Referenced by issue #88449: Blender LTS: Maintenance Task 2.93 Referenced by issue #88449, Blender LTS: Maintenance Task 2.93
|
@ -1055,8 +1055,12 @@ static void link_recurs_seq(BlendDataReader *reader, ListBase *lb)
|
|||
{
|
||||
BLO_read_list(reader, lb);
|
||||
|
||||
LISTBASE_FOREACH (Sequence *, seq, lb) {
|
||||
if (seq->seqbase.first) {
|
||||
LISTBASE_FOREACH_MUTABLE (Sequence *, seq, lb) {
|
||||
/* Sanity check. */
|
||||
if ((seq->machine < 1) || (seq->machine > MAXSEQ)) {
|
||||
BLI_freelinkN(lb, seq);
|
||||
}
|
||||
else if (seq->seqbase.first) {
|
||||
link_recurs_seq(reader, &seq->seqbase);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue