[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [32124] trunk/blender/source/blender/ editors/animation/keyframes_general.c: Fix #23583: crash when deleting last keyframe in an f-curve with a generator
Brecht Van Lommel
brechtvanlommel at pandora.be
Sat Sep 25 22:19:56 CEST 2010
Revision: 32124
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=32124
Author: blendix
Date: 2010-09-25 22:19:56 +0200 (Sat, 25 Sep 2010)
Log Message:
-----------
Fix #23583: crash when deleting last keyframe in an f-curve with a generator
f-modifier.
Modified Paths:
--------------
trunk/blender/source/blender/editors/animation/keyframes_general.c
Modified: trunk/blender/source/blender/editors/animation/keyframes_general.c
===================================================================
--- trunk/blender/source/blender/editors/animation/keyframes_general.c 2010-09-25 19:35:59 UTC (rev 32123)
+++ trunk/blender/source/blender/editors/animation/keyframes_general.c 2010-09-25 20:19:56 UTC (rev 32124)
@@ -82,6 +82,12 @@
/* Delete this keyframe */
memmove(&fcu->bezt[index], &fcu->bezt[index+1], sizeof(BezTriple)*(fcu->totvert-index-1));
fcu->totvert--;
+
+ if (fcu->totvert == 0) {
+ if (fcu->bezt)
+ MEM_freeN(fcu->bezt);
+ fcu->bezt= NULL;
+ }
/* recalc handles - only if it won't cause problems */
if (do_recalc)
More information about the Bf-blender-cvs
mailing list