diff options
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index 79c4becd405..14c11523455 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -8371,9 +8371,8 @@ static void SCULPT_OT_optimize(wmOperatorType *ot) static bool sculpt_no_multires_poll(bContext *C) { Object *ob = CTX_data_active_object(C); - SculptSession *ss = ob->sculpt; - if (ss && ss->pbvh && SCULPT_mode_poll(C)) { - return BKE_pbvh_type(ss->pbvh) != PBVH_GRIDS; + if (SCULPT_mode_poll(C) && ob->sculpt && ob->sculpt->pbvh) { + return BKE_pbvh_type(ob->sculpt->pbvh) != PBVH_GRIDS; } return false; } |