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:
authorNicholas Bishop <nicholasbishop@gmail.com>2012-04-04 20:35:13 +0400
committerNicholas Bishop <nicholasbishop@gmail.com>2012-04-04 20:35:13 +0400
commit84f3eb77867569318e80c27645970dc7e8454870 (patch)
tree51f6868aa8885b8077e7da342eb9e9950a2178da
parenteefdeebae5bae388054529d1e42615d73ef4a2de (diff)
Fix bug [#30810] Blender crashes with Array modifier
When merging bmesh customdata, memset the new blocks to zero. Otherwise can contain junk values (some layer types with pointers like MDeformVert can then crash.)
-rw-r--r--source/blender/blenkernel/intern/customdata.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/customdata.c b/source/blender/blenkernel/intern/customdata.c
index 638ba2ddc4d..c1d0a1674da 100644
--- a/source/blender/blenkernel/intern/customdata.c
+++ b/source/blender/blenkernel/intern/customdata.c
@@ -2251,8 +2251,11 @@ void CustomData_bmesh_copy_data(const CustomData *source, CustomData *dest,
const LayerTypeInfo *typeInfo;
int dest_i, src_i;
- if (!*dest_block)
+ if (!*dest_block) {
CustomData_bmesh_alloc_block(dest, dest_block);
+ if (*dest_block)
+ memset(*dest_block, 0, dest->totsize);
+ }
/* copies a layer at a time */
dest_i = 0;