bugfix [#23864] Bevel Modifier + UV crashes under certain conditions
authorCampbell Barton <ideasman42@gmail.com>
Fri, 17 Sep 2010 13:52:38 +0000 (13:52 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 17 Sep 2010 13:52:38 +0000 (13:52 +0000)
source/blender/blenkernel/intern/subsurf_ccg.c

index 4c85656dd914d4187b9ef4ac2c920ab30a1c94ca..d6486c3ee4d6106c7647e3fc2797de91a97064b4 100644 (file)
@@ -1421,7 +1421,7 @@ static void ccgDM_drawMappedFacesGLSL(DerivedMesh *dm, int (*setMaterial)(int, v
                                DM_vertex_attributes_from_gpu(dm, &gattribs, &attribs);
                }
 
                                DM_vertex_attributes_from_gpu(dm, &gattribs, &attribs);
                }
 
-               if(!doDraw || (setDrawOptions && !setDrawOptions(userData, origIndex))) {
+               if(!doDraw || (setDrawOptions && (origIndex != ORIGINDEX_NONE) && !setDrawOptions(userData, origIndex))) {
                        a += gridFaces*gridFaces*numVerts;
                        continue;
                }
                        a += gridFaces*gridFaces*numVerts;
                        continue;
                }