forked from bartvdbraak/blender
Fix RNA not giving error with invalid identifiers for collection properties
This commit is contained in:
parent
a44bb8603e
commit
0d027b4583
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user