From 67cf4cb5ec1e0f964fe41fa6aae80ffceedbf939 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 22 May 2018 07:26:45 +0200 Subject: Cleanup: replace MEM_SAFE_FREE -> MEM_freeN No need to check for NULL in this case. --- source/blender/editors/uvedit/uvedit_draw.c | 2 +- source/blender/editors/uvedit/uvedit_ops.c | 6 +++--- source/blender/editors/uvedit/uvedit_unwrap_ops.c | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) (limited to 'source/blender/editors/uvedit') diff --git a/source/blender/editors/uvedit/uvedit_draw.c b/source/blender/editors/uvedit/uvedit_draw.c index a39db060886..844bdcbc8d9 100644 --- a/source/blender/editors/uvedit/uvedit_draw.c +++ b/source/blender/editors/uvedit/uvedit_draw.c @@ -1061,7 +1061,7 @@ void ED_uvedit_draw_main( Object *ob_iter = objects[ob_index]; draw_uvs(sima, scene, view_layer, ob_iter, depsgraph); } - MEM_SAFE_FREE(objects); + MEM_freeN(objects); } else { draw_uvs_texpaint(sima, scene, view_layer, obact); diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c index 97075eba61e..f07c32370fd 100644 --- a/source/blender/editors/uvedit/uvedit_ops.c +++ b/source/blender/editors/uvedit/uvedit_ops.c @@ -2036,7 +2036,7 @@ static int uv_select_all_exec(bContext *C, wmOperator *op) WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data); } - MEM_SAFE_FREE(objects); + MEM_freeN(objects); return OPERATOR_FINISHED; } @@ -2500,7 +2500,7 @@ static int uv_select_linked_internal(bContext *C, wmOperator *op, const wmEvent } if (!uv_find_nearest_edge_multi(scene, ima, objects, objects_len, co, &hit)) { - MEM_SAFE_FREE(objects); + MEM_freeN(objects); return OPERATOR_CANCELLED; } } @@ -3032,7 +3032,7 @@ static int uv_border_select_exec(bContext *C, wmOperator *op) } } - MEM_SAFE_FREE(objects); + MEM_freeN(objects); return changed_multi ? OPERATOR_FINISHED : OPERATOR_CANCELLED; } diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c index d13a4646a2f..521470d4e5f 100644 --- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c +++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c @@ -839,7 +839,7 @@ static int pack_islands_exec(bContext *C, wmOperator *op) Object **objects = BKE_view_layer_array_from_objects_in_edit_mode_unique_data_with_uvs(view_layer, &objects_len); if (!uvedit_have_selection_multi(scene, objects, objects_len, true)) { - MEM_SAFE_FREE(objects); + MEM_freeN(objects); return OPERATOR_CANCELLED; } @@ -856,7 +856,7 @@ static int pack_islands_exec(bContext *C, wmOperator *op) WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); } - MEM_SAFE_FREE(objects); + MEM_freeN(objects); return OPERATOR_FINISHED; } @@ -1357,7 +1357,7 @@ static int unwrap_exec(bContext *C, wmOperator *op) Object **objects = BKE_view_layer_array_from_objects_in_edit_mode_unique_data(view_layer, &objects_len); if (!uvedit_have_selection_multi(scene, objects, objects_len, implicit)) { - MEM_SAFE_FREE(objects); + MEM_freeN(objects); return OPERATOR_CANCELLED; } @@ -1418,7 +1418,7 @@ static int unwrap_exec(bContext *C, wmOperator *op) ED_uvedit_pack_islands_multi(scene, objects, objects_len, true, true, true); - MEM_SAFE_FREE(objects); + MEM_freeN(objects); return OPERATOR_FINISHED; } -- cgit v1.2.3