Commit: 1a3acc7a8207e3a2b670b4532425e935a26f396d
Author: Campbell Barton
Date:   Tue Mar 11 23:04:59 2014 +1100
https://developer.blender.org/rB1a3acc7a8207e3a2b670b4532425e935a26f396d

Fix T39078: crash increasing hair emission number

===================================================================

M       source/blender/blenkernel/intern/particle.c

===================================================================

diff --git a/source/blender/blenkernel/intern/particle.c 
b/source/blender/blenkernel/intern/particle.c
index edf902e..3a5b4b5 100644
--- a/source/blender/blenkernel/intern/particle.c
+++ b/source/blender/blenkernel/intern/particle.c
@@ -2403,6 +2403,11 @@ void psys_find_parents(ParticleSimulationData *sim)
        if ((sim->psys->renderdata || G.is_rendering) && part->child_nbr && 
part->ren_child_nbr)
                totparent *= (float)part->child_nbr / 
(float)part->ren_child_nbr;
 
+       /* hard limit, workaround for it being ignored above */
+       if (sim->psys->totpart < totparent) {
+               totparent = sim->psys->totpart;
+       }
+
        tree = BLI_kdtree_new(totparent);
 
        for (p = 0, cpa = sim->psys->child; p < totparent; p++, cpa++) {

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to