diff options
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index 73173571277..dbb89617b08 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -3458,7 +3458,9 @@ static void do_surface_smooth_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, in Brush *brush = BKE_paint_brush(&sd->paint); SculptSession *ss = ob->sculpt; - if (ss->cache->mirror_symmetry_pass == 0 && ss->cache->radial_symmetry_pass == 0) { + if (ss->cache->first_time && ss->cache->mirror_symmetry_pass == 0 && + ss->cache->radial_symmetry_pass == 0) { + BLI_assert(ss->cache->surface_smooth_laplacian_disp == NULL); ss->cache->surface_smooth_laplacian_disp = MEM_callocN( SCULPT_vertex_count_get(ss) * 3 * sizeof(float), "HC smooth laplacian b"); } @@ -6860,9 +6862,9 @@ static const char *sculpt_tool_name(Sculpt *sd) void SCULPT_cache_free(StrokeCache *cache) { - if (cache->dial) { - MEM_freeN(cache->dial); - } + MEM_SAFE_FREE(cache->dial); + MEM_SAFE_FREE(cache->surface_smooth_laplacian_disp); + if (cache->pose_ik_chain) { SCULPT_pose_ik_chain_free(cache->pose_ik_chain); } |