[Bf-blender-cvs] [64bd4be] master: Fix for crash getting the name of RNA properties with empty name
Campbell Barton
noreply at git.blender.org
Thu Jan 23 14:28:45 CET 2014
Commit: 64bd4be6b2d9d093c56e6cce809d8cd1650ebe6f
Author: Campbell Barton
Date: Fri Jan 24 00:25:11 2014 +1100
https://developer.blender.org/rB64bd4be6b2d9d093c56e6cce809d8cd1650ebe6f
Fix for crash getting the name of RNA properties with empty name
===================================================================
M source/blender/makesrna/intern/rna_rna.c
===================================================================
diff --git a/source/blender/makesrna/intern/rna_rna.c b/source/blender/makesrna/intern/rna_rna.c
index 072f6fd..8d7a679 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)
More information about the Bf-blender-cvs
mailing list