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.
This commit is contained in:
parent
6334f97093
commit
73ce35d332
|
@ -59,7 +59,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;
|
||||
|
|
Loading…
Reference in New Issue