Commit: 32c6d92cb0dadd3cf2a1215b7738c009b184596e
Author: Antony Riakiotakis
Date:   Wed Jul 15 14:57:49 2015 +0200
Branches: master
https://developer.blender.org/rB32c6d92cb0dadd3cf2a1215b7738c009b184596e

Fix T45439 crash with subsurf when many materials present.

Silly oversight on the viewport patch

===================================================================

M       source/blender/blenkernel/intern/subsurf_ccg.c

===================================================================

diff --git a/source/blender/blenkernel/intern/subsurf_ccg.c 
b/source/blender/blenkernel/intern/subsurf_ccg.c
index d089660..0b0c011 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++;

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to