diff options
author | Janne Karhu <jhkarh@gmail.com> | 2009-05-08 02:31:19 +0400 |
---|---|---|
committer | Janne Karhu <jhkarh@gmail.com> | 2009-05-08 02:31:19 +0400 |
commit | 57beadf40613b3c4ba6f20cbaddc1066c6800bbc (patch) | |
tree | d68fdd09b406ca5a17a319f9b6d2a2f33ea72ba8 | |
parent | cdba1ddd5d454aca4d39dbb01866c155421b5d11 (diff) |
Second fix for [#18697] 2.49RC1: Keyed Particles fine in viewport but give me a crash during render
-rw-r--r-- | source/blender/blenkernel/intern/particle_system.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index d3ba3fa3802..f74e32acdbf 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -203,8 +203,11 @@ static void realloc_particles(Object *ob, ParticleSystem *psys, int new_totpart) if(psys->particles->keys) MEM_freeN(psys->particles->keys); - for(i=0, pa=psys->particles; i<totsaved; i++, pa++) - if(pa->keys) pa->keys= NULL; + for(i=totsaved, pa=psys->particles+totsaved; i<psys->totpart; i++, pa++) + if(pa->keys) { + pa->keys= NULL; + pa->totkey= 0; + } for(i=totsaved, pa=psys->particles+totsaved; i<psys->totpart; i++, pa++) if(pa->hair) MEM_freeN(pa->hair); |