diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-03-26 04:49:10 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-03-26 07:32:40 +0300 |
commit | 33da997193b570f12db57fabcbe02e7283b7bbfc (patch) | |
tree | 092bc162d034f17c6c72fde5c0a490b5d3f13f85 /source/blender/editors/object/object_modifier.c | |
parent | 52cff88f72674ff77638a5e60d8837e6c715b34e (diff) |
Fix crashes from various missing checks in operator poll functions
Issues exposed by 'bl_run_operators.py' utility.
Diffstat (limited to 'source/blender/editors/object/object_modifier.c')
-rw-r--r-- | source/blender/editors/object/object_modifier.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c index f6c13212976..0de2f114b94 100644 --- a/source/blender/editors/object/object_modifier.c +++ b/source/blender/editors/object/object_modifier.c @@ -1192,7 +1192,7 @@ static bool modifier_apply_poll(bContext *C) Object *ob = (ptr.owner_id != NULL) ? (Object *)ptr.owner_id : ED_object_active_context(C); ModifierData *md = ptr.data; /* May be NULL. */ - if (ID_REAL_USERS(ob->data) > 1) { + if ((ob->data != NULL) && ID_REAL_USERS(ob->data) > 1) { CTX_wm_operator_poll_msg_set(C, "Modifiers cannot be applied to multi-user data"); return false; } |