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:
Philipp Oeser 2019-11-21 13:58:56 +01:00 committed by Sergey Sharybin
parent 73ce35d332
commit 60e817693c
Notes: blender-bot 2023-02-14 11:42:40 +01:00
Referenced by issue #69332, Crash : attempting to reset a a custom property that has a string value crashes Blender
1 changed files with 1 additions and 1 deletions

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