[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [47724] trunk/blender/source/blender/ editors/animation/keyframes_general.c: fix for crashes in smooth-curves and clean-curves fcurve operators - missing NULL checks .

Campbell Barton ideasman42 at gmail.com
Mon Jun 11 10:15:40 CEST 2012


Revision: 47724
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=47724
Author:   campbellbarton
Date:     2012-06-11 08:15:37 +0000 (Mon, 11 Jun 2012)
Log Message:
-----------
fix for crashes in smooth-curves and clean-curves fcurve operators - missing NULL checks.

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	2012-06-11 08:06:42 UTC (rev 47723)
+++ trunk/blender/source/blender/editors/animation/keyframes_general.c	2012-06-11 08:15:37 UTC (rev 47724)
@@ -184,7 +184,7 @@
 	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 @@
 {
 	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++) {




More information about the Bf-blender-cvs mailing list