Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2019-09-22 19:51:45 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2019-09-22 19:51:45 +0300
commit012b5e6b22cfd180b577eab9516f4609207f7fd0 (patch)
treef0592924fe3ba1c29ebd0aa7e471082b9a88bb4d /source/blender/modifiers/intern/MOD_explode.c
parent591c1a1372a86217fe99a42917873462fdfda99b (diff)
Cleanup: MOD_explode: Sanitize code some more.
This happens to be a non-behavioral change, but previous code here was *very* confusing, and only ended up generating expected results by mere chance (since `facepa[i]` == `totpart` in case the face has no (valid) particle, i.e. `pa == NULL`)...
Diffstat (limited to 'source/blender/modifiers/intern/MOD_explode.c')
-rw-r--r--source/blender/modifiers/intern/MOD_explode.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/modifiers/intern/MOD_explode.c b/source/blender/modifiers/intern/MOD_explode.c
index 02008de9a88..5f0bbc8ecf1 100644
--- a/source/blender/modifiers/intern/MOD_explode.c
+++ b/source/blender/modifiers/intern/MOD_explode.c
@@ -1058,7 +1058,8 @@ static Mesh *explodeMesh(ExplodeModifierData *emd,
orig_v4 = source.v4;
- if (pa != NULL && cfra < pa->time) {
+ /* Same as above in the first loop over mesh's faces. */
+ if (pa == NULL || cfra < pa->time) {
mindex = totvert + totpart;
}
else {