diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-01-23 17:25:11 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-01-23 17:25:11 +0400 |
commit | 64bd4be6b2d9d093c56e6cce809d8cd1650ebe6f (patch) | |
tree | cf1683e37f753830807d535b63c071bcca391132 /source/blender | |
parent | 536800392ac29320afcc4c347c19be929600cf5f (diff) |
Fix for crash getting the name of RNA properties with empty name
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/makesrna/intern/rna_rna.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_rna.c b/source/blender/makesrna/intern/rna_rna.c index 072f6fdef86..8d7a679bea2 100644 --- a/source/blender/makesrna/intern/rna_rna.c +++ b/source/blender/makesrna/intern/rna_rna.c @@ -465,14 +465,14 @@ static void rna_Property_name_get(PointerRNA *ptr, char *value) { PropertyRNA *prop = (PropertyRNA *)ptr->data; rna_idproperty_check(&prop, ptr); - strcpy(value, prop->name); + strcpy(value, prop->name ? prop->name : ""); } static int rna_Property_name_length(PointerRNA *ptr) { PropertyRNA *prop = (PropertyRNA *)ptr->data; rna_idproperty_check(&prop, ptr); - return strlen(prop->name); + return prop->name ? strlen(prop->name) : 0; } static void rna_Property_description_get(PointerRNA *ptr, char *value) |