[Bf-blender-cvs] [cfb7f508ce7] master: Fix T69332: 'Reset to Default Value' on a custom string property crashes

Philipp Oeser noreply at git.blender.org
Fri Nov 22 12:21:14 CET 2019


Commit: cfb7f508ce76b8dea83da555e67813c161a6869d
Author: Philipp Oeser
Date:   Thu Nov 21 13:58:56 2019 +0100
Branches: master
https://developer.blender.org/rBcfb7f508ce76b8dea83da555e67813c161a6869d

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

===================================================================

M	source/blender/makesrna/intern/rna_access.c

===================================================================

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);



More information about the Bf-blender-cvs mailing list