Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2021-04-16 05:06:26 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-04-16 05:19:02 +0300
commitdc8a43c8755a5e880ff40765f878bf002a38096a (patch)
treead5a998ebbd658c964904b41c35e29fab06415b3 /source/blender/editors/space_outliner/outliner_edit.c
parent43baf38758d2f1cba5c9d551da2321bb99ac3161 (diff)
Fix RNA enum item callbacks not checking for NULL context
The NULL context is used to extract items for document generation.
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_edit.c')
-rw-r--r--source/blender/editors/space_outliner/outliner_edit.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/editors/space_outliner/outliner_edit.c b/source/blender/editors/space_outliner/outliner_edit.c
index 7fe66b017a4..0c97fdc1c18 100644
--- a/source/blender/editors/space_outliner/outliner_edit.c
+++ b/source/blender/editors/space_outliner/outliner_edit.c
@@ -665,6 +665,10 @@ static const EnumPropertyItem *outliner_id_itemf(bContext *C,
PropertyRNA *UNUSED(prop),
bool *r_free)
{
+ if (C == NULL) {
+ return DummyRNA_NULL_items;
+ }
+
EnumPropertyItem item_tmp = {0}, *item = NULL;
int totitem = 0;
int i = 0;