diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-07-13 18:19:57 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-07-13 18:19:57 +0400 |
commit | 7a3d0bac1a5adc85899c102c8b798fb363816712 (patch) | |
tree | 95866dbfc231e21b5370e7771f7ebb0145f72340 /source/blender/editors/uvedit/uvedit_parametrizer.c | |
parent | 1c15beb6b225826c0a0d83d4df58a0bac7ce0ed5 (diff) |
correct bad allocation sizes, unwrap was over-allocating, makesdna was under allocating.
Diffstat (limited to 'source/blender/editors/uvedit/uvedit_parametrizer.c')
-rw-r--r-- | source/blender/editors/uvedit/uvedit_parametrizer.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/uvedit/uvedit_parametrizer.c b/source/blender/editors/uvedit/uvedit_parametrizer.c index 6f92c1873d6..18f4e8cafaf 100644 --- a/source/blender/editors/uvedit/uvedit_parametrizer.c +++ b/source/blender/editors/uvedit/uvedit_parametrizer.c @@ -3682,8 +3682,8 @@ static SmoothNode *p_node_new(MemArena *arena, SmoothTriangle **tri, int ntri, f if (ntri <= 10 || depth >= 15) return node; - t1 = MEM_mallocN(sizeof(SmoothTriangle) * ntri, "PNodeTri1"); - t2 = MEM_mallocN(sizeof(SmoothTriangle) * ntri, "PNodeTri1"); + t1 = MEM_mallocN(sizeof(*t1) * ntri, "PNodeTri1"); + t2 = MEM_mallocN(sizeof(*t2) * ntri, "PNodeTri1"); axis = (bmax[0] - bmin[0] > bmax[1] - bmin[1]) ? 0 : 1; split = 0.5f * (bmin[axis] + bmax[axis]); |