diff options
author | Pablo Dobarro <pablodp606@gmail.com> | 2020-09-10 00:09:21 +0300 |
---|---|---|
committer | Pablo Dobarro <pablodp606@gmail.com> | 2020-09-10 19:47:13 +0300 |
commit | 4c3ad047e72f2ded33cd4aebf3402d2bbba66178 (patch) | |
tree | 4454688e2e98d5d7c190c9f30ecb6fa38c61016f /source/blender | |
parent | 51befa4108128a7bacf7a201046cf7ede999833a (diff) |
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
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt_boundary.c | 4 |
1 files changed, 4 insertions, 0 deletions
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); |