svn merge ^/trunk/blender -r42290:42292
[blender.git] / source / blender / blenkernel / intern / deform.c
index 6947bf05890e558b74d713890282b6b72e00b72e..49ca4e139cc8770d14c8ad10aa34aef3d8170b00 100644 (file)
@@ -561,7 +561,7 @@ MDeformWeight *defvert_verify_index(MDeformVert *dvert, const int defgroup)
        if (dw_new)
                return dw_new;
 
-       dw_new= BLI_cellalloc_calloc(sizeof(MDeformWeight)*(dv->totweight+1), "deformWeight");
+       dw_new= BLI_cellalloc_calloc(sizeof(MDeformWeight)*(dvert->totweight+1), "deformWeight");
        if (dvert->dw) {
                memcpy(dw_new, dvert->dw, sizeof(MDeformWeight)*dvert->totweight);
                BLI_cellalloc_free(dvert->dw);