[Bf-blender-cvs] [8a4d2eb670a] sculpt-dev: sculpt-dev: fix crash in boundary brush

Joseph Eagar noreply at git.blender.org
Sun Nov 20 19:02:27 CET 2022


Commit: 8a4d2eb670a4226a2d34371f86ff60b263b31d12
Author: Joseph Eagar
Date:   Sun Nov 20 10:02:13 2022 -0800
Branches: sculpt-dev
https://developer.blender.org/rB8a4d2eb670a4226a2d34371f86ff60b263b31d12

sculpt-dev: fix crash in boundary brush

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

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

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

diff --git a/source/blender/editors/sculpt_paint/sculpt_boundary.c b/source/blender/editors/sculpt_paint/sculpt_boundary.c
index b343fed85bd..f2dfc2dd6a8 100644
--- a/source/blender/editors/sculpt_paint/sculpt_boundary.c
+++ b/source/blender/editors/sculpt_paint/sculpt_boundary.c
@@ -1286,6 +1286,10 @@ static void sculpt_boundary_bend_data_init(SculptSession *ss,
       continue;
     }
 
+    if (boundary->edit_info[i].original_vertex.i == -1) {
+      continue;
+    }
+
     const float *co1 = SCULPT_vertex_co_get(ss, vertex);
 
     float dir[3];
diff --git a/source/blender/editors/sculpt_paint/sculpt_dyntopo.c b/source/blender/editors/sculpt_paint/sculpt_dyntopo.c
index e4b47fe0b79..2066e1cbbf7 100644
--- a/source/blender/editors/sculpt_paint/sculpt_dyntopo.c
+++ b/source/blender/editors/sculpt_paint/sculpt_dyntopo.c
@@ -268,8 +268,8 @@ void SCULPT_cotangents_begin(Object *ob, SculptSession *ss)
       if (!ss->vemap) {
         BKE_mesh_vert_edge_map_create(&ss->vemap,
                                       &ss->vemap_mem,
-                                      mesh->mvert,
-                                      mesh->medge,
+                                      BKE_mesh_verts(mesh),
+                                      BKE_mesh_edges(mesh),
                                       mesh->totvert,
                                       mesh->totedge,
                                       true);



More information about the Bf-blender-cvs mailing list