Fix #23204: render disconnected hair with child particles could crash.

This commit is contained in:
Brecht Van Lommel
2010-08-06 15:31:35 +00:00
parent acca04bf33
commit 463c3b5cf7

View File

@@ -1528,6 +1528,10 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem
totchild=psys->totchild;
/* can happen for disconnected/global hair */
if(part->type==PART_HAIR && !psys->childcache)
totchild= 0;
if(G.rendering == 0) { /* preview render */
totchild = (int)((float)totchild * (float)part->disp / 100.0f);
}