[Bf-blender-cvs] [4c3ad047e72] master: Fix T79754: Boundary Brush crashing with symmetry enabled

Pablo Dobarro noreply at git.blender.org
Thu Sep 10 18:47:41 CEST 2020


Commit: 4c3ad047e72f2ded33cd4aebf3402d2bbba66178
Author: Pablo Dobarro
Date:   Wed Sep 9 23:09:21 2020 +0200
Branches: master
https://developer.blender.org/rB4c3ad047e72f2ded33cd4aebf3402d2bbba66178

Fix T79754: Boundary Brush crashing with symmetry enabled

When creating the boundaries for the symmetry passess, it could happen
that a symmetrical vertex is not found inside the radius of the brush.
In that case, the function to initialize a new boundary was called with
index -1 (BOUNDARY_VERTEX_NONE), so this function should also check
that the initial vertex that is going to be used to find the boundary is
a valid index.

Reviewed By: sergey

Maniphest Tasks: T79754

Differential Revision: https://developer.blender.org/D8860

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

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

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

diff --git a/source/blender/editors/sculpt_paint/sculpt_boundary.c b/source/blender/editors/sculpt_paint/sculpt_boundary.c
index 3051413a405..b07dd18b6fc 100644
--- a/source/blender/editors/sculpt_paint/sculpt_boundary.c
+++ b/source/blender/editors/sculpt_paint/sculpt_boundary.c
@@ -501,6 +501,10 @@ SculptBoundary *SCULPT_boundary_data_init(Object *object,
 {
   SculptSession *ss = object->sculpt;
 
+  if (initial_vertex == BOUNDARY_VERTEX_NONE) {
+    return NULL;
+  }
+
   SCULPT_vertex_random_access_ensure(ss);
   SCULPT_boundary_info_ensure(object);



More information about the Bf-blender-cvs mailing list