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++) {

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to