diff options
author | Pablo Dobarro <pablodp606@gmail.com> | 2020-07-09 18:41:04 +0300 |
---|---|---|
committer | Pablo Dobarro <pablodp606@gmail.com> | 2020-07-09 18:41:14 +0300 |
commit | 13b1374497bfa3bd1eca401daab89164da50f747 (patch) | |
tree | c91c4334272e0ebfa48faefb2ad287cf3328ea57 /source/blender/editors | |
parent | 78d48343ae0ece8723d2404d6f07354a7ce9512b (diff) |
Fix crash when using Mask by Color in Multires
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D8207
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index 2f8d17055f4..245014d5027 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -8681,6 +8681,11 @@ static int sculpt_mask_by_color_invoke(bContext *C, wmOperator *op, const wmEven BKE_sculpt_update_object_for_edit(depsgraph, ob, true, true, false); + /* Color data is not available in Multires. */ + if (BKE_pbvh_type(ss->pbvh) != PBVH_FACES) { + return OPERATOR_CANCELLED; + } + if (!ss->vcol) { return OPERATOR_CANCELLED; } |