Commit: 188c1cc18496cc018dee8c3f47d2379734082cf5
Author: Antony Riakiotakis
Date:   Wed Jun 24 11:56:59 2015 +0200
Branches: temp_display_optimization
https://developer.blender.org/rB188c1cc18496cc018dee8c3f47d2379734082cf5

Fix crash reported on blenderartists

A really bad issue that meant we would miscount many mixed triangle/quad
meshes.

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

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

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

diff --git a/source/blender/blenkernel/intern/cdderivedmesh.c 
b/source/blender/blenkernel/intern/cdderivedmesh.c
index 831b2f2..d1e277c 100644
--- a/source/blender/blenkernel/intern/cdderivedmesh.c
+++ b/source/blender/blenkernel/intern/cdderivedmesh.c
@@ -1827,7 +1827,7 @@ static GPUDrawObject *cdDM_GPUobject_new(DerivedMesh *dm)
         * each quad as two triangles */
        mat_info = MEM_callocN(sizeof(*mat_info) * totmat, 
"GPU_drawobject_new.mat_orig_to_new");
        for (i = 0; i < totface; i++) {
-               if (mface->v4) {
+               if (mface[i].v4) {
                        mat_info[mface[i].mat_nr].elements += 6;
                        mat_info[mface[i].mat_nr].loops += 4;
                }

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

Reply via email to