diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-01-18 02:58:54 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-01-18 03:01:17 +0300 |
commit | 27dff3fbc1e74aa6613d68a0d9f9b0096fc86f6e (patch) | |
tree | 91c4fb3bbe944a4f9e0e6d72a25d12310872f849 /source/blender/modifiers/intern/MOD_displace.c | |
parent | 8400b4b566350bd9d726a07627e74f5a995280da (diff) | |
parent | e6df02861e17f75d4dd243776f35208681b78465 (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/modifiers/intern/MOD_displace.c')
-rw-r--r-- | source/blender/modifiers/intern/MOD_displace.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/modifiers/intern/MOD_displace.c b/source/blender/modifiers/intern/MOD_displace.c index 94a4ae9be17..53a77b6fe38 100644 --- a/source/blender/modifiers/intern/MOD_displace.c +++ b/source/blender/modifiers/intern/MOD_displace.c @@ -308,7 +308,7 @@ static void displaceModifier_do( modifier_get_vgroup(ob, dm, dmd->defgrp_name, &dvert, &defgrp_index); if (dmd->texture) { - tex_co = MEM_callocN(sizeof(*tex_co) * numVerts, + tex_co = MEM_calloc_arrayN((size_t)numVerts, sizeof(*tex_co), "displaceModifier_do tex_co"); get_texture_coords((MappingInfoModifierData *)dmd, ob, dm, vertexCos, tex_co, numVerts); @@ -329,7 +329,7 @@ static void displaceModifier_do( } clnors = CustomData_get_layer(ldata, CD_NORMAL); - vert_clnors = MEM_mallocN(sizeof(*vert_clnors) * (size_t)numVerts, __func__); + vert_clnors = MEM_malloc_arrayN(numVerts, sizeof(*vert_clnors), __func__); BKE_mesh_normals_loop_to_vertex(numVerts, dm->getLoopArray(dm), dm->getNumLoops(dm), (const float (*)[3])clnors, vert_clnors); } |