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:
authorBrecht Van Lommel <brecht@blender.org>2020-11-19 18:26:48 +0300
committerBrecht Van Lommel <brecht@blender.org>2020-11-19 18:29:29 +0300
commit0d027b45834fc47778cb553487962fd3461c7175 (patch)
treed53713ea421cc7716b20d18effd795ee611790cc /source/blender/makesrna/intern/rna_define.c
parenta44bb8603e551285f569ef43669b0eb378da1dd8 (diff)
Fix RNA not giving error with invalid identifiers for collection properties
Diffstat (limited to 'source/blender/makesrna/intern/rna_define.c')
-rw-r--r--source/blender/makesrna/intern/rna_define.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c
index 8cc4f545ca9..03a61ccaa21 100644
--- a/source/blender/makesrna/intern/rna_define.c
+++ b/source/blender/makesrna/intern/rna_define.c
@@ -3458,6 +3458,13 @@ void RNA_def_property_collection_funcs(PropertyRNA *prop,
void RNA_def_property_srna(PropertyRNA *prop, const char *type)
{
+ char error[512];
+ if (rna_validate_identifier(type, error, false) == 0) {
+ CLOG_ERROR(&LOG, "struct identifier \"%s\" error - %s", type, error);
+ DefRNA.error = true;
+ return;
+ }
+
prop->srna = (StructRNA *)type;
}