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>2017-08-23 07:59:14 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-08-23 08:02:21 +0300
commit1e60ac33949ae533857fc6a48ce5fbc2402dd060 (patch)
treef3653899ca70880ec4c5b8438c15d16e85e60147 /source/blender/makesrna/intern/rna_ID.c
parent4761dea573f6fa9a57150596098c17f723d3a49f (diff)
RNA: report error on struct naming collision
Fixes T52463, error instead of crash.
Diffstat (limited to 'source/blender/makesrna/intern/rna_ID.c')
-rw-r--r--source/blender/makesrna/intern/rna_ID.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c
index a74758a4f71..9d7dd7f424a 100644
--- a/source/blender/makesrna/intern/rna_ID.c
+++ b/source/blender/makesrna/intern/rna_ID.c
@@ -273,6 +273,10 @@ StructRNA *rna_PropertyGroup_register(Main *UNUSED(bmain), ReportList *reports,
return NULL;
}
+ if (!RNA_struct_available_or_report(reports, identifier)) {
+ return NULL;
+ }
+
return RNA_def_struct_ptr(&BLENDER_RNA, identifier, &RNA_PropertyGroup); /* XXX */
}