From bc97d7832906318a1185b3fb460b1d8d89020ba0 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 6 Aug 2021 13:59:38 +1000 Subject: Cleanup: use MEM_SAFE_FREE macro --- source/blender/editors/space_image/image_ops.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'source/blender/editors/space_image') diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index dad354ba8ee..613042a2ab9 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -2508,10 +2508,7 @@ static ImageNewData *image_new_init(bContext *C, wmOperator *op) static void image_new_free(wmOperator *op) { - if (op->customdata) { - MEM_freeN(op->customdata); - op->customdata = NULL; - } + MEM_SAFE_FREE(op->customdata); } static int image_new_exec(bContext *C, wmOperator *op) -- cgit v1.2.3