From 4c3ad047e72f2ded33cd4aebf3402d2bbba66178 Mon Sep 17 00:00:00 2001 From: Pablo Dobarro Date: Wed, 9 Sep 2020 23:09:21 +0200 Subject: 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 --- source/blender/editors/sculpt_paint/sculpt_boundary.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source') 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); -- cgit v1.2.3