Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Dobarro <pablodp606@gmail.com>2020-07-09 18:41:04 +0300
committerPablo Dobarro <pablodp606@gmail.com>2020-07-09 18:41:14 +0300
commit13b1374497bfa3bd1eca401daab89164da50f747 (patch)
treec91c4334272e0ebfa48faefb2ad287cf3328ea57 /source/blender/editors/sculpt_paint/sculpt.c
parent78d48343ae0ece8723d2404d6f07354a7ce9512b (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/sculpt_paint/sculpt.c')
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c5
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;
}