Fix #30328: Crash when using edge slide
authorSergey Sharybin <sergey.vfx@gmail.com>
Wed, 29 Feb 2012 14:32:09 +0000 (14:32 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Wed, 29 Feb 2012 14:32:09 +0000 (14:32 +0000)
Looks like it was missed BMesh element index for faces in emDM_drawMappedFacesMat.
There was already call of BM_mesh_elem_index_ensure to ensure there's element
index for vertices, added flag to ensure there's also index for faces.

source/blender/blenkernel/intern/editderivedmesh.c

index 5a82fde8487e9c1e283cd9cd9aaad18b08158a43..f73a2ff6c1af8b0d3424c0eb27d57ba90b328c07 100644 (file)
@@ -1125,7 +1125,7 @@ static void emDM_drawMappedFacesMat(
        /* always use smooth shading even for flat faces, else vertex colors wont interpolate */
        glShadeModel(GL_SMOOTH);
 
-       BM_mesh_elem_index_ensure(bm, BM_VERT);
+       BM_mesh_elem_index_ensure(bm, BM_VERT|BM_FACE);
 
 #define PASSATTRIB(loop, eve, vert) {                                                                                  \
        if (attribs.totorco) {                                                                                                          \