From 64bd4be6b2d9d093c56e6cce809d8cd1650ebe6f Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 24 Jan 2014 00:25:11 +1100 Subject: [PATCH] Fix for crash getting the name of RNA properties with empty name --- source/blender/makesrna/intern/rna_rna.c | 4 ++-- 1 file 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)