diff options
author | Lukas Tönne <lukas.toenne@gmail.com> | 2014-03-25 15:33:07 +0400 |
---|---|---|
committer | Lukas Tönne <lukas.toenne@gmail.com> | 2014-03-25 15:34:30 +0400 |
commit | a7ed1db51fa32a80b943816d354b45b413d98fa3 (patch) | |
tree | cdb49f49c848582948ab7be0a7da44129afc43d5 | |
parent | b7dbb2f48e32858201ce2e5c5b11222f06e5a381 (diff) |
Fix T39319: Particle System Bug on Cycles Render.
Crashes due to bad dm face calculation in particle RNA/cycles hair.
This stuff is a total mess, but this kind of check is used in other
places and prevents crashing at least.
-rw-r--r-- | source/blender/makesrna/intern/rna_particle.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c index 31e87f44a6a..f6f133c5114 100644 --- a/source/blender/makesrna/intern/rna_particle.c +++ b/source/blender/makesrna/intern/rna_particle.c @@ -475,7 +475,8 @@ static void rna_ParticleSystem_uv_on_emitter(ParticleSystem *particlesystem, Rep if (particle_no < totpart) { /* get uvco & mcol */ - num = particle->num_dmcache; + num = (ELEM(particle->num_dmcache, DMCACHE_ISCHILD, DMCACHE_NOTFOUND)) ? + particle->num : particle->num_dmcache; if (num == DMCACHE_NOTFOUND) if (particle->num < modifier->dm->getNumTessFaces(modifier->dm)) |