diff options
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/customdata.c | 13 | ||||
-rw-r--r-- | source/blender/src/transform_conversions.c | 2 |
2 files changed, 10 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/customdata.c b/source/blender/blenkernel/intern/customdata.c index d8ce311b5ca..663c94e5155 100644 --- a/source/blender/blenkernel/intern/customdata.c +++ b/source/blender/blenkernel/intern/customdata.c @@ -97,11 +97,16 @@ static void layerCopy_mdeformvert(const void *source, void *dest, for(i = 0; i < count; ++i) { MDeformVert *dvert = (MDeformVert *)((char *)dest + i * size); - MDeformWeight *dw = MEM_callocN(dvert->totweight * sizeof(*dw), - "layerCopy_mdeformvert dw"); - memcpy(dw, dvert->dw, dvert->totweight * sizeof(*dw)); - dvert->dw = dw; + if(dvert->totweight) { + MDeformWeight *dw = MEM_callocN(dvert->totweight * sizeof(*dw), + "layerCopy_mdeformvert dw"); + + memcpy(dw, dvert->dw, dvert->totweight * sizeof(*dw)); + dvert->dw = dw; + } + else + dvert->dw = NULL; } } diff --git a/source/blender/src/transform_conversions.c b/source/blender/src/transform_conversions.c index 7efcdb93cbc..24ead9a52c7 100644 --- a/source/blender/src/transform_conversions.c +++ b/source/blender/src/transform_conversions.c @@ -2012,7 +2012,7 @@ static void createTransEditVerts(TransInfo *t) int propmode = t->flag & T_PROP_EDIT; int mirror = 0; - if ((t->context & CTX_NO_MIRROR) == 0 || (G.scene->toolsettings->editbutflag & B_MESH_X_MIRROR)) + if ((t->context & CTX_NO_MIRROR) == 0 && (G.scene->toolsettings->editbutflag & B_MESH_X_MIRROR)) { mirror = 1; } |