Page MenuHome
Paste P669

T54899 snippet
ActivePublic

Authored by Philipp Oeser (lichtwerk) on May 2 2018, 3:12 PM.
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index 80e377ad8e1..7b4fb87fe9a 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -3084,7 +3084,10 @@ int RNA_property_string_default_length(PointerRNA *UNUSED(ptr), PropertyRNA *pro
BLI_assert(RNA_property_type(prop) == PROP_STRING);
- return strlen(sprop->defaultvalue);
+ if (sprop->defaultvalue)
+ return strlen(sprop->defaultvalue);
+ else
+ return 0;
}
int RNA_property_enum_get(PointerRNA *ptr, PropertyRNA *prop)