diff options
author | Brecht Van Lommel <brecht@blender.org> | 2020-11-19 18:26:48 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2020-11-19 18:29:29 +0300 |
commit | 0d027b45834fc47778cb553487962fd3461c7175 (patch) | |
tree | d53713ea421cc7716b20d18effd795ee611790cc /source | |
parent | a44bb8603e551285f569ef43669b0eb378da1dd8 (diff) |
Fix RNA not giving error with invalid identifiers for collection properties
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/makesrna/intern/rna_define.c | 7 |
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; } |