diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2015-07-15 15:57:49 +0300 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2015-07-15 15:58:10 +0300 |
commit | 32c6d92cb0dadd3cf2a1215b7738c009b184596e (patch) | |
tree | 21df788f112974d75a3adc381cfc5f12dfe48902 /source | |
parent | 56bf25d219b1e4960f2f105b988674aa14a1e41a (diff) |
Fix T45439 crash with subsurf when many materials present.
Silly oversight on the viewport patch
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/subsurf_ccg.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/subsurf_ccg.c b/source/blender/blenkernel/intern/subsurf_ccg.c index d089660b83a..0b0c011bf5a 100644 --- a/source/blender/blenkernel/intern/subsurf_ccg.c +++ b/source/blender/blenkernel/intern/subsurf_ccg.c @@ -2197,7 +2197,7 @@ static GPUDrawObject *ccgDM_GPUObjectNew(DerivedMesh *dm) gdo->materials[curmat].totloops = matinfo[i].loops; gdo->materials[curmat].mat_nr = i; gdo->materials[curmat].totpolys = matinfo[i].polys; - gdo->materials[curmat].polys = MEM_mallocN(sizeof(int) * matinfo[0].polys, "GPUBufferMaterial.polys"); + gdo->materials[curmat].polys = MEM_mallocN(sizeof(int) * matinfo[i].polys, "GPUBufferMaterial.polys"); curelement += matinfo[i].elements; curmat++; |