Fix T78536: Crash calling object.modifier_apply on an empty
Caused by rB6add0cc88a0d. Maniphest Tasks: T78536 Differential Revision: https://developer.blender.org/D8440
This commit is contained in:
parent
2bb7378779
commit
473d9507fa
Notes:
blender-bot
2023-02-14 00:57:33 +01:00
Referenced by issue #78536, Crash in poll() function of object.modifier_apply
|
@ -1347,7 +1347,7 @@ static bool modifier_apply_poll_ex(bContext *C, bool allow_shared)
|
|||
Object *ob = (ptr.owner_id != NULL) ? (Object *)ptr.owner_id : ED_object_active_context(C);
|
||||
ModifierData *md = ptr.data; /* May be NULL. */
|
||||
|
||||
if (ID_IS_OVERRIDE_LIBRARY(ob) || ID_IS_OVERRIDE_LIBRARY(ob->data)) {
|
||||
if (ID_IS_OVERRIDE_LIBRARY(ob) || ((ob->data != NULL) && ID_IS_OVERRIDE_LIBRARY(ob->data))) {
|
||||
CTX_wm_operator_poll_msg_set(C, "Modifiers cannot be applied on override data");
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue