Fix T45807: Instant crash adding any modifier to NLA track

Caused by rBcbf936a3327282
This commit is contained in:
Julian Eisel 2015-08-15 14:47:25 +02:00
parent 119cda0a0d
commit 19cc75d642
Notes: blender-bot 2023-02-14 08:46:23 +01:00
Referenced by issue #45817, BGE Crash with group instanced curve objects
Referenced by issue #45807, Instant crash adding any modfier to NLA track
Referenced by issue #45749, Segfault (missing MTFace cdlayer from SubSurf DM).
1 changed files with 3 additions and 1 deletions

View File

@ -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