Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2009-02-09 14:05:34 +0300
committerJoshua Leung <aligorith@gmail.com>2009-02-09 14:05:34 +0300
commitc58d336a33b4105530af326dccef077ba0274fa6 (patch)
tree0c3cccdd29849878a5722d3253d039fc8a59c35b /source/blender/editors/animation/keyframes_general.c
parent2b818935fe708f5f386375d484faa35b9163b4c7 (diff)
Keyframe-related bugfixes:
* Deleting keyframes should be safer now * Graph Editor no longer crashes on F-Curves with no keyframes/samples * Silenced console prints that occurred when an F-Curve had now keyframes.
Diffstat (limited to 'source/blender/editors/animation/keyframes_general.c')
-rw-r--r--source/blender/editors/animation/keyframes_general.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/editors/animation/keyframes_general.c b/source/blender/editors/animation/keyframes_general.c
index 30d05b91582..cf7d56da5d9 100644
--- a/source/blender/editors/animation/keyframes_general.c
+++ b/source/blender/editors/animation/keyframes_general.c
@@ -103,6 +103,13 @@ void delete_fcurve_keys(FCurve *fcu)
}
}
+ /* Free the array of BezTriples if there are not keyframes */
+ if (fcu->totvert == 0) {
+ if (fcu->bezt)
+ MEM_freeN(fcu->bezt);
+ fcu->bezt= NULL;
+ }
+
#if 0 // XXX for now, we don't get rid of empty curves...
/* Only delete if there isn't an ipo-driver still hanging around on an empty curve */
if ((icu->totvert==0) && (icu->driver==NULL)) {