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:
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_detail.c5
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;
}