From 473d9507fa73a17970be325c8f797bbf6654aab4 Mon Sep 17 00:00:00 2001 From: Philipp Oeser Date: Fri, 31 Jul 2020 19:19:29 +0200 Subject: Fix T78536: Crash calling object.modifier_apply on an empty Caused by rB6add0cc88a0d. Maniphest Tasks: T78536 Differential Revision: https://developer.blender.org/D8440 --- source/blender/editors/object/object_modifier.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source') diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c index 8a736c380bf..e93bd8bd94e 100644 --- a/source/blender/editors/object/object_modifier.c +++ b/source/blender/editors/object/object_modifier.c @@ -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; } -- cgit v1.2.3