[Bf-blender-cvs] [fa06238aa78] temp_bmesh_multires: Fix bug in last commit.

Joseph Eagar noreply at git.blender.org
Thu May 13 01:40:23 CEST 2021


Commit: fa06238aa785dca728613b3ed3cf006b88330c1a
Author: Joseph Eagar
Date:   Tue May 11 21:45:43 2021 -0700
Branches: temp_bmesh_multires
https://developer.blender.org/rBfa06238aa785dca728613b3ed3cf006b88330c1a

Fix bug in last commit.

===================================================================

M	source/blender/editors/sculpt_paint/sculpt_dyntopo.c

===================================================================

diff --git a/source/blender/editors/sculpt_paint/sculpt_dyntopo.c b/source/blender/editors/sculpt_paint/sculpt_dyntopo.c
index 7c783f73ce2..b8e8728b843 100644
--- a/source/blender/editors/sculpt_paint/sculpt_dyntopo.c
+++ b/source/blender/editors/sculpt_paint/sculpt_dyntopo.c
@@ -608,6 +608,11 @@ static void SCULPT_dynamic_topology_disable_ex(
   /* Clear data. */
   me->flag &= ~ME_SCULPT_DYNAMIC_TOPOLOGY;
 
+  if (ss->bm_log) {
+    BM_log_free(ss->bm_log, true);
+    ss->bm_log = NULL;
+  }
+
   /* Typically valid but with global-undo they can be NULL, see: T36234. */
   if (ss->bm) {
     // rebuild ss->persistent_base if necassary
@@ -616,10 +621,6 @@ static void SCULPT_dynamic_topology_disable_ex(
     BM_mesh_free(ss->bm);
     ss->bm = NULL;
   }
-  if (ss->bm_log) {
-    BM_log_free(ss->bm_log, true);
-    ss->bm_log = NULL;
-  }
 
   BKE_particlesystem_reset_all(ob);
   BKE_ptcache_object_reset(scene, ob, PTCACHE_RESET_OUTDATED);



More information about the Bf-blender-cvs mailing list