diff options
author | Philipp Oeser <info@graphics-engineer.com> | 2021-05-25 18:46:17 +0300 |
---|---|---|
committer | Philipp Oeser <info@graphics-engineer.com> | 2021-05-26 10:51:55 +0300 |
commit | ebde6e1852622d60d1cd574f1c7e2d6855ae90ba (patch) | |
tree | f5a26d46a6340e585bbb10eab36f41e3cb4b7f74 /source/blender/editors/object/object_vgroup.c | |
parent | 0f7becece7fd829f8ccb9c0fdcb5b929fc25fb70 (diff) |
Fix T88251: "Operator Cheat Sheet" Crash
Caused by {rB919558854d62}.
Same fix as in {rBdc8a43c8755a} -- let RNA enum item callbacks check
for NULL context.
The NULL context is used to extract items for document generation.
Maniphest Tasks: T88251
Differential Revision: https://developer.blender.org/D11391
Diffstat (limited to 'source/blender/editors/object/object_vgroup.c')
-rw-r--r-- | source/blender/editors/object/object_vgroup.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c index 5f81f9afe4f..3f40d637188 100644 --- a/source/blender/editors/object/object_vgroup.c +++ b/source/blender/editors/object/object_vgroup.c @@ -3985,6 +3985,10 @@ static const EnumPropertyItem *vgroup_itemf(bContext *C, PropertyRNA *UNUSED(prop), bool *r_free) { + if (C == NULL) { + return DummyRNA_NULL_items; + } + Object *ob = ED_object_context(C); EnumPropertyItem tmp = {0, "", 0, "", ""}; EnumPropertyItem *item = NULL; |