Commit: fb70f9bf997114a55cdfebe47fa42005c2112927
Author: Joshua Leung
Date:   Thu Mar 8 15:17:53 2018 +1300
Branches: master
https://developer.blender.org/rBfb70f9bf997114a55cdfebe47fa42005c2112927

Fix crash if NLA strip with "Use Animated Influence" setting is enabled without 
the Influence Strip F-Curve existing

===================================================================

M       source/blender/editors/space_nla/nla_draw.c

===================================================================

diff --git a/source/blender/editors/space_nla/nla_draw.c 
b/source/blender/editors/space_nla/nla_draw.c
index 255fc0d6f8f..d33b84f76c0 100644
--- a/source/blender/editors/space_nla/nla_draw.c
+++ b/source/blender/editors/space_nla/nla_draw.c
@@ -285,16 +285,20 @@ static void nla_draw_strip_curves(NlaStrip *strip, float 
yminc, float ymaxc)
                float cfra;
                
                /* plot the curve (over the strip's main region) */
-               glBegin(GL_LINE_STRIP);
-               /* sample at 1 frame intervals, and draw
-                *      - min y-val is yminc, max is y-maxc, so clamp in those 
regions
-                */
-               for (cfra = strip->start; cfra <= strip->end; cfra += 1.0f) {
-                       float y = evaluate_fcurve(fcu, cfra);
-                       CLAMP(y, 0.0f, 1.0f);
-                       glVertex2f(cfra, ((y * yheight) + yminc));
+               if (fcu) {
+                       glBegin(GL_LINE_STRIP);
+                       
+                       /* sample at 1 frame intervals, and draw
+                        *      - min y-val is yminc, max is y-maxc, so clamp 
in those regions
+                        */
+                       for (cfra = strip->start; cfra <= strip->end; cfra += 
1.0f) {
+                               float y = evaluate_fcurve(fcu, cfra);
+                               CLAMP(y, 0.0f, 1.0f);
+                               glVertex2f(cfra, ((y * yheight) + yminc));
+                       }
+                       
+                       glEnd(); // GL_LINE_STRIP
                }
-               glEnd(); // GL_LINE_STRIP
        }
        else {
                /* use blend in/out values only if both aren't zero */

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to