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>2011-08-05 10:09:30 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-08-05 10:09:30 +0400
commitc946969bb90c177319c183e7155c6f360230ea2f (patch)
tree9ee13da640900d19ce003314fdd306f18031dcd1 /source/blender/makesrna/intern/rna_access.c
parent82e863bdae70b1297318aa7fd98f72cab074ef66 (diff)
fix for possible uninitialized RNA strings, when RNA_string_get property is not found, initialize the string to "".
Diffstat (limited to 'source/blender/makesrna/intern/rna_access.c')
-rw-r--r--source/blender/makesrna/intern/rna_access.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index e71be8c153e..f1056c86a4c 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -4007,10 +4007,13 @@ void RNA_string_get(PointerRNA *ptr, const char *name, char *value)
{
PropertyRNA *prop= RNA_struct_find_property(ptr, name);
- if(prop)
+ if(prop) {
RNA_property_string_get(ptr, prop, value);
- else
+ }
+ else {
printf("RNA_string_get: %s.%s not found.\n", ptr->type->identifier, name);
+ value[0]= '\0';
+ }
}
char *RNA_string_get_alloc(PointerRNA *ptr, const char *name, char *fixedbuf, int fixedlen)