forked from bartvdbraak/blender
Fix T39424: VSE: Bake Sound to Curve CRASHES Blender
BKE_sequencer_offset_animdata() was simply assuming bezt member of fcurve was always valid, while it might be NULL (e.g. when fcurve is using FPoints instead, like when generated from sound file).
This commit is contained in:
parent
cc6b106d34
commit
fd3de8b042
@ -4034,6 +4034,7 @@ void BKE_sequencer_offset_animdata(Scene *scene, Sequence *seq, int ofs)
|
||||
for (fcu = scene->adt->action->curves.first; fcu; fcu = fcu->next) {
|
||||
if (strstr(fcu->rna_path, "sequence_editor.sequences_all[") && strstr(fcu->rna_path, str)) {
|
||||
unsigned int i;
|
||||
if (fcu->bezt) {
|
||||
for (i = 0; i < fcu->totvert; i++) {
|
||||
BezTriple *bezt = &fcu->bezt[i];
|
||||
bezt->vec[0][0] += ofs;
|
||||
@ -4041,6 +4042,13 @@ void BKE_sequencer_offset_animdata(Scene *scene, Sequence *seq, int ofs)
|
||||
bezt->vec[2][0] += ofs;
|
||||
}
|
||||
}
|
||||
if (fcu->fpt) {
|
||||
for (i = 0; i < fcu->totvert; i++) {
|
||||
FPoint *fpt = &fcu->fpt[i];
|
||||
fpt->vec[0] += ofs;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user