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:
Diffstat (limited to 'source/blender/makesrna/intern/rna_access.c')
-rw-r--r--source/blender/makesrna/intern/rna_access.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index 0d4e31cdaf2..ad79771416d 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -2216,8 +2216,17 @@ char *RNA_property_string_get_alloc(PointerRNA *ptr, PropertyRNA *prop, char *fi
else
buf= MEM_mallocN(sizeof(char)*(length+1), "RNA_string_get_alloc");
+#ifndef NDEBUG
+ /* safety check to ensure the string is actually set */
+ buf[length]= 255;
+#endif
+
RNA_property_string_get(ptr, prop, buf);
+#ifndef NDEBUG
+ BLI_assert(buf[length] == '\0');
+#endif
+
return buf;
}