From 92a92fdca520a28b7939941afc2997b264caa0df Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Tue, 13 Sep 2022 07:48:41 -0500 Subject: Fix T101031: Crash with Initialize Face Sets operator --- source/blender/editors/sculpt_paint/sculpt_face_set.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/blender/editors') diff --git a/source/blender/editors/sculpt_paint/sculpt_face_set.c b/source/blender/editors/sculpt_paint/sculpt_face_set.c index e66a7f8b9de..8aa645c6af5 100644 --- a/source/blender/editors/sculpt_paint/sculpt_face_set.c +++ b/source/blender/editors/sculpt_paint/sculpt_face_set.c @@ -713,6 +713,9 @@ static int sculpt_face_set_init_exec(bContext *C, wmOperator *op) const float threshold = RNA_float_get(op->ptr, "threshold"); + Mesh *mesh = ob->data; + ss->face_sets = BKE_sculpt_face_sets_ensure(mesh); + switch (mode) { case SCULPT_FACE_SETS_FROM_LOOSE_PARTS: sculpt_face_sets_init_flood_fill(ob, sculpt_face_sets_init_loose_parts_test, threshold); -- cgit v1.2.3