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:
authorCampbell Barton <ideasman42@gmail.com>2012-06-11 12:15:37 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-06-11 12:15:37 +0400
commit31c8f4fbd39374532af0033779f5853e4be7a528 (patch)
treeac2607d921bed8e3f7cbd10a3f2166b5f86d8173 /source/blender/editors/animation/keyframes_general.c
parent638211d4e6c3cc291d2c3fffcc35c9bfe7a2df51 (diff)
fix for crashes in smooth-curves and clean-curves fcurve operators - missing NULL checks.
Diffstat (limited to 'source/blender/editors/animation/keyframes_general.c')
-rw-r--r--source/blender/editors/animation/keyframes_general.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/editors/animation/keyframes_general.c b/source/blender/editors/animation/keyframes_general.c
index 14bee00a72a..f29be418941 100644
--- a/source/blender/editors/animation/keyframes_general.c
+++ b/source/blender/editors/animation/keyframes_general.c
@@ -184,7 +184,7 @@ void clean_fcurve(FCurve *fcu, float thresh)
int totCount, i;
/* check if any points */
- if ((fcu == NULL) || (fcu->totvert <= 1))
+ if ((fcu == NULL) || (fcu->bezt == NULL) || (fcu->totvert <= 1))
return;
/* make a copy of the old BezTriples, and clear IPO curve */
@@ -286,7 +286,11 @@ void smooth_fcurve(FCurve *fcu)
{
BezTriple *bezt;
int i, x, totSel = 0;
-
+
+ if (fcu->bezt == NULL) {
+ return;
+ }
+
/* first loop through - count how many verts are selected */
bezt = fcu->bezt;
for (i = 0; i < fcu->totvert; i++, bezt++) {