diff options
author | Janne Karhu <jhkarh@gmail.com> | 2011-01-27 20:29:22 +0300 |
---|---|---|
committer | Janne Karhu <jhkarh@gmail.com> | 2011-01-27 20:29:22 +0300 |
commit | ba9dacbd3dc7e0ff80b2bb7e54dd2c1532db5512 (patch) | |
tree | 70a180bc98adaddfb5caee0ef8c6592648128798 /source | |
parent | ce7f7d6e5fe98ab6fc1a7bfee3635851dce48421 (diff) |
Silly mistake in own previous commit, now we have particles again!
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/particle_system.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index e35504d73d7..a0948e61708 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -221,16 +221,18 @@ static void realloc_particles(ParticleSimulationData *sim, int new_totpart) if(totpart) { newpars= MEM_callocN(totpart*sizeof(ParticleData), "particles"); - if(psys->part->phystype == PART_PHYS_BOIDS) + if(newpars == NULL) + return; + + if(psys->part->phystype == PART_PHYS_BOIDS) { newboids= MEM_callocN(totpart*sizeof(BoidParticle), "boid particles"); - if(ELEM(NULL, newpars, newboids)) { - /* allocation error! */ - if(newpars) - MEM_freeN(newpars); - if(newboids) - MEM_freeN(newboids); - return; + if(newboids == NULL) { + /* allocation error! */ + if(newpars) + MEM_freeN(newpars); + return; + } } } |