diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2019-09-22 19:29:05 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2019-09-22 19:29:05 +0300 |
commit | 6eea69a7ad3eb92cf7feca2b06704a0b54ff12fe (patch) | |
tree | 9192ab0d6d33105a562e0c705c6a677c43d3a785 /source/blender/modifiers/intern/MOD_explode.c | |
parent | 981b063473e602490c743c9d8ba93453ab7884d0 (diff) |
Fix T70150: Explode modifier crashes with empty vertex group.
There’s be a lot to say about that explode modifier code, for now just
follow other places in code... But the handling of 'invalid'/'unkown'
particle case is... quiet confusing to say the least.
Diffstat (limited to 'source/blender/modifiers/intern/MOD_explode.c')
-rw-r--r-- | source/blender/modifiers/intern/MOD_explode.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/modifiers/intern/MOD_explode.c b/source/blender/modifiers/intern/MOD_explode.c index ed42a4bf8b1..5ba61ea818b 100644 --- a/source/blender/modifiers/intern/MOD_explode.c +++ b/source/blender/modifiers/intern/MOD_explode.c @@ -1069,7 +1069,7 @@ static Mesh *explodeMesh(ExplodeModifierData *emd, /* override uv channel for particle age */ if (mtface) { - float age = (cfra - pa->time) / pa->lifetime; + float age = (facepa[i] != totpart) ? (cfra - pa->time) / pa->lifetime : 0.0f; /* Clamp to this range to avoid flipping to the other side of the coordinates. */ CLAMP(age, 0.001f, 0.999f); |