From cfb7f508ce76b8dea83da555e67813c161a6869d Mon Sep 17 00:00:00 2001 From: Philipp Oeser Date: Thu, 21 Nov 2019 13:58:56 +0100 Subject: 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 --- source/blender/makesrna/intern/rna_access.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source') diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c index aeb6d528cdb..78cd99837c3 100644 --- a/source/blender/makesrna/intern/rna_access.c +++ b/source/blender/makesrna/intern/rna_access.c @@ -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); -- cgit v1.2.3