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:
authorSybren A. Stüvel <sybren@blender.org>2019-11-26 14:12:29 +0300
committerSybren A. Stüvel <sybren@blender.org>2019-11-26 14:12:29 +0300
commit2d7effc27d8b893c2e650079203c1451c82d8e5b (patch)
treea7e63035190c32d888e65c6eb49d93a290991ab4 /source/blender/editors/mesh/editmesh_mask_extract.c
parentfa1a946d4f3a5e8d010b7eee0a2d93e774fb0009 (diff)
Fix segfault when polling `MESH_OT_paint_mask_extract`
`CTX_data_active_object(C)` returns `NULL` when there is no active object, and this was not tested for in the code.
Diffstat (limited to 'source/blender/editors/mesh/editmesh_mask_extract.c')
-rw-r--r--source/blender/editors/mesh/editmesh_mask_extract.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/mesh/editmesh_mask_extract.c b/source/blender/editors/mesh/editmesh_mask_extract.c
index 40430bccf16..0d886360253 100644
--- a/source/blender/editors/mesh/editmesh_mask_extract.c
+++ b/source/blender/editors/mesh/editmesh_mask_extract.c
@@ -61,7 +61,7 @@
static bool paint_mask_extract_poll(bContext *C)
{
Object *ob = CTX_data_active_object(C);
- if (ob->mode == OB_MODE_SCULPT) {
+ if (ob != NULL && ob->mode == OB_MODE_SCULPT) {
if (ob->sculpt->bm) {
CTX_wm_operator_poll_msg_set(C, "The mask can not be extracted with dyntopo activated.");
return false;