diff options
Diffstat (limited to 'source/blender/blenkernel/intern/dynamicpaint.c')
-rw-r--r-- | source/blender/blenkernel/intern/dynamicpaint.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c index a39f2ccb6d8..1c61afe5e5a 100644 --- a/source/blender/blenkernel/intern/dynamicpaint.c +++ b/source/blender/blenkernel/intern/dynamicpaint.c @@ -5166,7 +5166,7 @@ static int dynamicPaint_prepareEffectStep(struct Depsgraph *depsgraph, ListBase *effectors = BKE_effectors_create(depsgraph, ob, NULL, surface->effector_weights); /* allocate memory for force data (dir vector + strength) */ - *force = MEM_mallocN(sData->total_points * 4 * sizeof(float), "PaintEffectForces"); + *force = MEM_mallocN(sizeof(float[4]) * sData->total_points, "PaintEffectForces"); if (*force) { DynamicPaintEffectData data = { @@ -6260,7 +6260,7 @@ static int dynamicPaint_doStep(Depsgraph *depsgraph, /* calculate brush speed vectors if required */ if (surface->type == MOD_DPAINT_SURFACE_T_PAINT && brush->flags & MOD_DPAINT_DO_SMUDGE) { - bData->brush_velocity = MEM_callocN(sData->total_points * sizeof(float) * 4, + bData->brush_velocity = MEM_callocN(sizeof(float[4]) * sData->total_points, "Dynamic Paint brush velocity"); /* init adjacency data if not already */ if (!sData->adj_data) { |