From 7c9131d11eb01a70db440fac7bb3f4b3833d544a Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Wed, 7 Oct 2020 14:27:33 +0200 Subject: Refactor `BKE_id_copy_ex` to return the new ID pointer. Note that possibility to pass the new ID pointer as parameter was kept, as this is needed for some rather specific cases (like in depsgraph/COW, when copying into already allocated memory). Part of T71219. --- source/blender/modifiers/intern/MOD_datatransfer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/modifiers/intern/MOD_datatransfer.c') diff --git a/source/blender/modifiers/intern/MOD_datatransfer.c b/source/blender/modifiers/intern/MOD_datatransfer.c index c77f392ddcb..94dc8a8c43b 100644 --- a/source/blender/modifiers/intern/MOD_datatransfer.c +++ b/source/blender/modifiers/intern/MOD_datatransfer.c @@ -198,7 +198,7 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh * (dtmd->data_types & DT_TYPES_AFFECT_MESH)) { /* We need to duplicate data here, otherwise setting custom normals, edges' sharpness, etc., * could modify org mesh, see T43671. */ - BKE_id_copy_ex(NULL, &me_mod->id, (ID **)&result, LIB_ID_COPY_LOCALIZE); + result = (Mesh *)BKE_id_copy_ex(NULL, &me_mod->id, NULL, LIB_ID_COPY_LOCALIZE); } BKE_reports_init(&reports, RPT_STORE); -- cgit v1.2.3