diff options
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt_detail.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt_detail.c b/source/blender/editors/sculpt_paint/sculpt_detail.c index b7d1cd8c005..f071deaa219 100644 --- a/source/blender/editors/sculpt_paint/sculpt_detail.c +++ b/source/blender/editors/sculpt_paint/sculpt_detail.c @@ -259,8 +259,11 @@ static int sample_detail(bContext *C, int mx, int my, int mode) ED_view3d_viewcontext_init(C, &vc, depsgraph); Object *ob = vc.obact; - SculptSession *ss = ob->sculpt; + if (ob == NULL) { + return OPERATOR_CANCELLED; + } + SculptSession *ss = ob->sculpt; if (!ss->pbvh) { return OPERATOR_CANCELLED; } |