mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
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
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue