Fix a particle memory allocation mismatch using MEM_allocN for alloc and BLI_cellalloc_free for free
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user