diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-01-07 07:30:02 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-01-07 07:30:02 +0300 |
commit | 109d3b84545ea8cd60e6f42d2f72c2a2d19f7283 (patch) | |
tree | f83310e5e93bfabbc67557a8850a53607e22e26a | |
parent | adf961a46cea7d3d7d6a3caf05a74f560201aa2e (diff) |
bugfix [#25519] particlesystem, type hair, hair dynamics enabled: crash with amount 0
-rw-r--r-- | source/blender/blenkernel/intern/particle_system.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index f57364dfdef..0e22697d0a7 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -3297,8 +3297,8 @@ static void hair_step(ParticleSimulationData *sim, float cfra) cloth_free_modifier(psys->clmd); } - /* dynamics with cloth simulation */ - if(psys->part->type==PART_HAIR && psys->flag & PSYS_HAIR_DYNAMICS) + /* dynamics with cloth simulation, psys->particles can be NULL with 0 particles [#25519] */ + if(psys->part->type==PART_HAIR && psys->flag & PSYS_HAIR_DYNAMICS && psys->particles) do_hair_dynamics(sim); /* following lines were removed r29079 but cause bug [#22811], see report for details */ |