[Bf-blender-cvs] [60e817693ce] blender-v2.81-release: Fix T69332: 'Reset to Default Value' on a custom string property crashes

Philipp Oeser noreply at git.blender.org
Tue Dec 3 14:29:40 CET 2019


Commit: 60e817693ce707842dc8521a6ee94ce1778e6372
Author: Philipp Oeser
Date:   Thu Nov 21 13:58:56 2019 +0100
Branches: blender-v2.81-release
https://developer.blender.org/rB60e817693ce707842dc8521a6ee94ce1778e6372

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