diff options
-rw-r--r-- | source/blender/bmesh/intern/bmesh_mesh.c | 2 | ||||
-rw-r--r-- | source/blender/bmesh/intern/bmesh_operators.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/bmesh/intern/bmesh_mesh.c b/source/blender/bmesh/intern/bmesh_mesh.c index 4027d4b2c19..64368390444 100644 --- a/source/blender/bmesh/intern/bmesh_mesh.c +++ b/source/blender/bmesh/intern/bmesh_mesh.c @@ -240,7 +240,7 @@ void BM_mesh_clear(BMesh *bm) bm_mempool_init(bm, &bm_mesh_allocsize_default); bm->stackdepth = 1; - bm->totflags = 1; + bm->totflags = 0; CustomData_reset(&bm->vdata); CustomData_reset(&bm->edata); diff --git a/source/blender/bmesh/intern/bmesh_operators.c b/source/blender/bmesh/intern/bmesh_operators.c index 3ffdbe167d7..7f8b40d85dc 100644 --- a/source/blender/bmesh/intern/bmesh_operators.c +++ b/source/blender/bmesh/intern/bmesh_operators.c @@ -1248,7 +1248,7 @@ static void bmo_flag_layer_free(BMesh *bm) /* now go through and memcpy all the flag */ BM_ITER_MESH_INDEX (ele, &iter, bm, BM_VERTS_OF_MESH, i) { void *oldflags = ele->oflags; - ele->oflags = BLI_mempool_calloc(newpool); + ele->oflags = BLI_mempool_alloc(newpool); memcpy(ele->oflags, oldflags, new_totflags_size); BM_elem_index_set(ele, i); /* set_inline */ BM_ELEM_API_FLAG_CLEAR((BMElemF *)ele); @@ -1264,7 +1264,7 @@ static void bmo_flag_layer_free(BMesh *bm) BM_ITER_MESH_INDEX (ele, &iter, bm, BM_EDGES_OF_MESH, i) { void *oldflags = ele->oflags; - ele->oflags = BLI_mempool_calloc(newpool); + ele->oflags = BLI_mempool_alloc(newpool); memcpy(ele->oflags, oldflags, new_totflags_size); BM_elem_index_set(ele, i); /* set_inline */ BM_ELEM_API_FLAG_CLEAR((BMElemF *)ele); @@ -1280,7 +1280,7 @@ static void bmo_flag_layer_free(BMesh *bm) BM_ITER_MESH_INDEX (ele, &iter, bm, BM_FACES_OF_MESH, i) { void *oldflags = ele->oflags; - ele->oflags = BLI_mempool_calloc(newpool); + ele->oflags = BLI_mempool_alloc(newpool); memcpy(ele->oflags, oldflags, new_totflags_size); BM_elem_index_set(ele, i); /* set_inline */ BM_ELEM_API_FLAG_CLEAR((BMElemF *)ele); |