Page Menu
Home
Search
Configure Global Search
Log In
Paste
P669
T54899 snippet
Active
Public
Actions
Authored by
Philipp Oeser (lichtwerk)
on May 2 2018, 3:12 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Tags
None
Subscribers
None
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)
Event Timeline
Philipp Oeser (lichtwerk)
created this paste.
May 2 2018, 3:12 PM
Philipp Oeser (lichtwerk)
mentioned this in
T54899: Custom property -> revert to default value crashes blender
.
Philipp Oeser (lichtwerk)
mentioned this in
T69332: Crash : attempting to reset a a custom property that has a string value crashes Blender
.
Sep 2 2019, 11:59 AM
Log In to Comment