From 337302b56f27ccbcdaac44fffd2a69a8e19b736f Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 25 Jan 2012 22:06:53 +0000 Subject: [PATCH] hrmf, fix for fix [#29988] Segfault when unwrap default cube with smart project / follow active quads I think that we need a check here for thick wrapped strings but for now we dont have any thick wrapped strings with default values so comment it. --- source/blender/makesrna/intern/rna_access.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c index 3dc0e7c37e4..5339ee58acf 100644 --- a/source/blender/makesrna/intern/rna_access.c +++ b/source/blender/makesrna/intern/rna_access.c @@ -4747,8 +4747,15 @@ ParameterList *RNA_parameter_list_create(ParameterList *parms, PointerRNA *UNUSE break; case PROP_STRING: { const char *defvalue= ((StringPropertyRNA*)parm)->defaultvalue; - if(defvalue && defvalue[0]) + if(defvalue && defvalue[0]) { + /* causes bug [#29988], possibly this is only correct for thick wrapped + * need to look further into it - campbell */ +#if 0 BLI_strncpy(data, defvalue, size); +#else + memcpy(data, &defvalue, size); +#endif + } break; } case PROP_POINTER: