From 0811236da2d5c709e274d9442fd6fbda471c2136 Mon Sep 17 00:00:00 2001 From: Andrew Wiggin Date: Wed, 9 Nov 2011 14:39:49 +0000 Subject: Fix a particle memory allocation mismatch using MEM_allocN for alloc and BLI_cellalloc_free for free --- source/blender/blenkernel/intern/particle_system.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source') diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index 00abc331f0b..c759641f6a9 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -67,6 +67,7 @@ #include "BLI_utildefines.h" #include "BLI_linklist.h" #include "BLI_edgehash.h" +#include "BLI_cellalloc.h" #include "BKE_main.h" #include "BKE_animsys.h" @@ -3483,7 +3484,7 @@ static void do_hair_dynamics(ParticleSimulationData *sim) if(dvert) { if(!dvert->totweight) { - dvert->dw = MEM_callocN (sizeof(MDeformWeight), "deformWeight"); + dvert->dw = BLI_cellalloc_calloc(sizeof(MDeformWeight), "deformWeight"); dvert->totweight = 1; } @@ -3504,7 +3505,7 @@ static void do_hair_dynamics(ParticleSimulationData *sim) if(dvert) { if(!dvert->totweight) { - dvert->dw = MEM_callocN (sizeof(MDeformWeight), "deformWeight"); + dvert->dw = BLI_cellalloc_calloc(sizeof(MDeformWeight), "deformWeight"); dvert->totweight = 1; } /* roots should be 1.0, the rest can be anything from 0.0 to 1.0 */ -- cgit v1.2.3