Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntony Riakiotakis <kalast@gmail.com>2015-07-15 15:57:49 +0300
committerAntony Riakiotakis <kalast@gmail.com>2015-07-15 15:58:10 +0300
commit32c6d92cb0dadd3cf2a1215b7738c009b184596e (patch)
tree21df788f112974d75a3adc381cfc5f12dfe48902 /source/blender
parent56bf25d219b1e4960f2f105b988674aa14a1e41a (diff)
Fix T45439 crash with subsurf when many materials present.
Silly oversight on the viewport patch
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenkernel/intern/subsurf_ccg.c2
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++;