diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-06-24 17:50:12 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-06-24 17:50:12 +0400 |
commit | d19d1b549746238c4c1a694a8d3781a1fd0cf49d (patch) | |
tree | e6a2b33fc35785e0f0827b42fd05b862baca4317 /source/blender/blenkernel | |
parent | 77616cbe1150293ee04880e71bc1bd71ba4e4204 (diff) |
Add MEMCPY_STRUCT_OFS macro for copying values after a struct member
use for DM_to_mesh to avoid clobbering the ListBase
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/DerivedMesh.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c index 7a91c01664a..74907fd0662 100644 --- a/source/blender/blenkernel/intern/DerivedMesh.c +++ b/source/blender/blenkernel/intern/DerivedMesh.c @@ -615,7 +615,8 @@ void DM_to_mesh(DerivedMesh *dm, Mesh *me, Object *ob, CustomDataMask mask) MEM_freeN(me->mselect); } - *me = tmp; + /* skip the listbase */ + MEMCPY_STRUCT_OFS(me, &tmp, id.prev); } void DM_to_meshkey(DerivedMesh *dm, Mesh *me, KeyBlock *kb) |