Fix T69332: 'Reset to Default Value' on a custom string property crashes

Thx @campbellbarton for the heads up!

Maniphest Tasks: T69332

Differential Revision: https://developer.blender.org/D6284
This commit is contained in:
2019-11-21 13:58:56 +01:00
parent e98d27fd8d
commit cfb7f508ce

View File

@@ -3604,7 +3604,7 @@ char *RNA_property_string_get_default_alloc(PointerRNA *ptr,
/* this is the length without \0 terminator */
int RNA_property_string_default_length(PointerRNA *UNUSED(ptr), PropertyRNA *prop)
{
StringPropertyRNA *sprop = (StringPropertyRNA *)prop;
StringPropertyRNA *sprop = (StringPropertyRNA *)rna_ensure_property(prop);
BLI_assert(RNA_property_type(prop) == PROP_STRING);