Fix for [#21908] SPH fluids - crash when editing while playing
authorJanne Karhu <jhkarh@gmail.com>
Mon, 5 Apr 2010 09:46:01 +0000 (09:46 +0000)
committerJanne Karhu <jhkarh@gmail.com>
Mon, 5 Apr 2010 09:46:01 +0000 (09:46 +0000)
source/blender/blenkernel/intern/particle_system.c

index aa48336247c56d2c8934562aab28e6e5d06b2845..0a202e8166eceaedfedbc93187779ca1988ba49e 100644 (file)
@@ -3732,6 +3732,8 @@ static void system_step(ParticleSimulationData *sim, float cfra)
        oldtotpart = psys->totpart;
 
        emit = emit_particles(sim, use_cache, cfra);
+       if(emit > 0)
+               BKE_ptcache_id_clear(&pid, PTCACHE_CLEAR_ALL, cfra);
        init = emit*emit + (psys->recalc & PSYS_RECALC_RESET);
 
        if(init) {