[Bf-blender-cvs] [19cc75d] master: Fix T45807: Instant crash adding any modifier to NLA track

Julian Eisel noreply at git.blender.org
Sat Aug 15 14:49:09 CEST 2015


Commit: 19cc75d642422f68af1f1aa87790914cad4e20b7
Author: Julian Eisel
Date:   Sat Aug 15 14:47:25 2015 +0200
Branches: master
https://developer.blender.org/rB19cc75d642422f68af1f1aa87790914cad4e20b7

Fix T45807: Instant crash adding any modifier to NLA track

Caused by rBcbf936a3327282

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

M	source/blender/blenkernel/intern/fmodifier.c

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

diff --git a/source/blender/blenkernel/intern/fmodifier.c b/source/blender/blenkernel/intern/fmodifier.c
index 6e78d08..04c5ddd 100644
--- a/source/blender/blenkernel/intern/fmodifier.c
+++ b/source/blender/blenkernel/intern/fmodifier.c
@@ -1389,6 +1389,8 @@ static float eval_fmodifier_influence(FModifier *fcm, float evaltime)
  *	  working on the 'global' result of the modified curve, not some localised segment,
  *	  so nevaltime gets set to whatever the last time-modifying modifier likes...
  *	- we start from the end of the stack, as only the last one matters for now
+ *
+ * Note: *fcu might be NULL
  */
 float evaluate_time_fmodifiers(FModifierStackStorage *storage, ListBase *modifiers,
                                FCurve *fcu, float cvalue, float evaltime)
@@ -1399,7 +1401,7 @@ float evaluate_time_fmodifiers(FModifierStackStorage *storage, ListBase *modifie
 	if (ELEM(NULL, modifiers, modifiers->last))
 		return evaltime;
 
-	if (fcu->flag & FCURVE_MOD_OFF)
+	if (fcu && fcu->flag & FCURVE_MOD_OFF)
 		return evaltime;
 
 	/* Starting from the end of the stack, calculate the time effects of various stacked modifiers




More information about the Bf-blender-cvs mailing list