Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2014-01-23 17:25:11 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-01-23 17:25:11 +0400
commit64bd4be6b2d9d093c56e6cce809d8cd1650ebe6f (patch)
treecf1683e37f753830807d535b63c071bcca391132 /source/blender/makesrna/intern/rna_rna.c
parent536800392ac29320afcc4c347c19be929600cf5f (diff)
Fix for crash getting the name of RNA properties with empty name
Diffstat (limited to 'source/blender/makesrna/intern/rna_rna.c')
-rw-r--r--source/blender/makesrna/intern/rna_rna.c4
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)