forked from bartvdbraak/blender
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.)
This commit is contained in:
parent
eefdeebae5
commit
84f3eb7786
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user