diff options
author | Nicholas Bishop <nicholasbishop@gmail.com> | 2012-03-29 15:31:44 +0400 |
---|---|---|
committer | Nicholas Bishop <nicholasbishop@gmail.com> | 2012-03-29 15:31:44 +0400 |
commit | 7474397f854cbe23bd7e55dc46469c722d8eda9c (patch) | |
tree | 0f93685d2d1b2b69ecb8daa093564331ab2a5d85 /source/blender/blenkernel/intern | |
parent | 7661f429c6bc0b146187cb8a7522460577f334d8 (diff) |
More array modifier fixes.
* Skip calculation of merge indices if merging isn't enabled
* Clean up usage of BMesh operators to fix small memory leak
* Fix harmless BLI_assert in CustomData_bmesh_merge
* Another null-initialization fix in CustomData_bmesh_merge
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/customdata.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/customdata.c b/source/blender/blenkernel/intern/customdata.c index 17a29d89d19..638ba2ddc4d 100644 --- a/source/blender/blenkernel/intern/customdata.c +++ b/source/blender/blenkernel/intern/customdata.c @@ -2165,6 +2165,7 @@ void CustomData_bmesh_merge(CustomData *source, CustomData *dest, int t; CustomData_merge(source, dest, mask, alloctype, 0); + dest->pool = NULL; CustomData_bmesh_init_pool(dest, 512, htype); switch (htype) { @@ -2198,6 +2199,7 @@ void CustomData_bmesh_merge(CustomData *source, CustomData *dest, /*ensure all current elements follow new customdata layout*/ BM_ITER(f, &iter, bm, BM_FACES_OF_MESH, NULL) { BM_ITER(l, &liter, bm, BM_LOOPS_OF_FACE, f) { + tmp = NULL; CustomData_bmesh_copy_data(&destold, dest, l->head.data, &tmp); CustomData_bmesh_free_block(&destold, &l->head.data); l->head.data = tmp; |