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:
-rw-r--r--source/blender/makesrna/intern/rna_define.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c
index 56516c8af4d..aed2c94b493 100644
--- a/source/blender/makesrna/intern/rna_define.c
+++ b/source/blender/makesrna/intern/rna_define.c
@@ -4350,6 +4350,16 @@ void RNA_enum_item_add(EnumPropertyItem **items, int *totitem, const EnumPropert
(*items)[tot] = *item;
*totitem = tot + 1;
+
+ /* Ensure we get crashes on missing calls to 'RNA_enum_item_end', see T74227. */
+#ifdef DEBUG
+ static const EnumPropertyItem item_error = {
+ -1, POINTER_FROM_INT(-1), -1, POINTER_FROM_INT(-1), POINTER_FROM_INT(-1)};
+ if (item != &item_error) {
+ RNA_enum_item_add(items, totitem, &item_error);
+ *totitem -= 1;
+ }
+#endif
}
void RNA_enum_item_add_separator(EnumPropertyItem **items, int *totitem)