[Bf-committers] [Bf-blender-cvs] [fd3de8b] master: Fix T39424: VSE: Bake Sound to Curve CRASHES Blender

Bastien Montagne montagne29 at wanadoo.fr
Wed Mar 26 20:08:16 CET 2014


Forgot to mention, even though this was not a regression, imho could be 
included in an 'a' release (fix is simple and safe, and issue is 
annoying, even though not so much common).
On 26/03/2014 20:03, Bastien Montagne wrote:
> Commit: fd3de8b04224711b1502e4acde33d5f772dde544
> Author: Bastien Montagne
> Date:   Wed Mar 26 20:01:09 2014 +0100
> https://developer.blender.org/rBfd3de8b04224711b1502e4acde33d5f772dde544
>
> 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).
>
> ===================================================================
>
> M	source/blender/blenkernel/intern/sequencer.c
>
> ===================================================================
>
> diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c
> index 27ac7fd..82d46fe 100644
> --- a/source/blender/blenkernel/intern/sequencer.c
> +++ b/source/blender/blenkernel/intern/sequencer.c
> @@ -4034,11 +4034,19 @@ 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;
> -			for (i = 0; i < fcu->totvert; i++) {
> -				BezTriple *bezt = &fcu->bezt[i];
> -				bezt->vec[0][0] += ofs;
> -				bezt->vec[1][0] += ofs;
> -				bezt->vec[2][0] += ofs;
> +			if (fcu->bezt) {
> +				for (i = 0; i < fcu->totvert; i++) {
> +					BezTriple *bezt = &fcu->bezt[i];
> +					bezt->vec[0][0] += ofs;
> +					bezt->vec[1][0] += 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;
> +				}
>   			}
>   		}
>   	}
>
> _______________________________________________
> Bf-blender-cvs mailing list
> Bf-blender-cvs at blender.org
> http://lists.blender.org/mailman/listinfo/bf-blender-cvs
>



More information about the Bf-committers mailing list