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:
authorSergey Sharybin <sergey.vfx@gmail.com>2020-02-03 16:07:48 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2020-02-03 16:07:48 +0300
commitf037244e2cbd9dec7d423cdd1f966678156a374a (patch)
tree954150431b04e83358603bc033f8ac3ee9d00aa3 /source/blender/makesrna/intern/rna_particle.c
parentaea125fe9d2db2eaff640e0fc42724f00413a49c (diff)
parentbc3d7faab73165de8a7a7a9f8b19dcdfc046a51b (diff)
Merge branch 'blender-v2.82-release'
Diffstat (limited to 'source/blender/makesrna/intern/rna_particle.c')
-rw-r--r--source/blender/makesrna/intern/rna_particle.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c
index 4155c453440..90658784b9a 100644
--- a/source/blender/makesrna/intern/rna_particle.c
+++ b/source/blender/makesrna/intern/rna_particle.c
@@ -385,11 +385,11 @@ static void rna_ParticleSystem_co_hair(
totchild = 0;
}
- if (particle_no < totpart) {
+ if (particle_no < totpart && particlesystem->pathcache) {
cache = particlesystem->pathcache[particle_no];
max_k = (int)cache->segments;
}
- else if (particle_no < totpart + totchild) {
+ else if (particle_no < totpart + totchild && particlesystem->childcache) {
cache = particlesystem->childcache[particle_no - totpart];
if (cache->segments < 0) {
@@ -400,6 +400,7 @@ static void rna_ParticleSystem_co_hair(
}
}
else {
+ zero_v3(n_co);
return;
}
@@ -409,6 +410,9 @@ static void rna_ParticleSystem_co_hair(
mul_m4_v3(particlesystem->imat, n_co);
mul_m4_v3(object->obmat, n_co);
}
+ else {
+ zero_v3(n_co);
+ }
}
static const EnumPropertyItem *rna_Particle_Material_itemf(bContext *C,