diff options
author | Pablo Dobarro <pablodp606@gmail.com> | 2019-09-17 23:15:58 +0300 |
---|---|---|
committer | Pablo Dobarro <pablodp606@gmail.com> | 2019-09-18 17:40:58 +0300 |
commit | a1318d241553246c266410eb1ae4ba23e73179e1 (patch) | |
tree | 441a61ae1129e3892a7eb787df560d50d3f67fd8 /source/blender/editors | |
parent | 4dbea85a3fdbc9726a1e23d4f7a9ab767a12ddbb (diff) |
Fix T69580: Smooth brush freezes on highpoly mesh
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D5831
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index dc94da1cedf..462249dc572 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -6969,8 +6969,19 @@ void sculpt_pbvh_clear(Object *ob) /* Clear out any existing DM and PBVH */ if (ss->pbvh) { BKE_pbvh_free(ss->pbvh); + ss->pbvh = NULL; } - ss->pbvh = NULL; + + if (ss->pmap) { + MEM_freeN(ss->pmap); + ss->pmap = NULL; + } + + if (ss->pmap_mem) { + MEM_freeN(ss->pmap_mem); + ss->pmap_mem = NULL; + } + BKE_object_free_derived_caches(ob); /* Tag to rebuild PBVH in depsgraph. */ |