diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-10-01 08:00:41 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-10-01 08:00:41 +0400 |
commit | ded317840bffbf2bddc7887587292f2c5e9f8ce3 (patch) | |
tree | 0b79dd023e43457bfe778ba49bd24c62f170cb0c | |
parent | a5367802acee857d4b36eb8c6ed2eef4c9ec17a8 (diff) |
fix for leak when freeing mask data in editmode.
-rw-r--r-- | source/blender/editors/mesh/mesh_data.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/editors/mesh/mesh_data.c b/source/blender/editors/mesh/mesh_data.c index 4637d926a62..735492cb553 100644 --- a/source/blender/editors/mesh/mesh_data.c +++ b/source/blender/editors/mesh/mesh_data.c @@ -761,7 +761,12 @@ static int mesh_customdata_clear_exec__internal(bContext *C, BLI_assert(CustomData_layertype_is_singleton(type) == TRUE); if (CustomData_has_layer(data, type)) { - CustomData_free_layers(data, type, tot); + if (me->edit_btmesh) { + BM_data_layer_free(me->edit_btmesh->bm, data, type); + } + else { + CustomData_free_layers(data, type, tot); + } DAG_id_tag_update(&me->id, 0); WM_event_add_notifier(C, NC_GEOM | ND_DATA, me); |