Fix for invalid buffer access on zero-face meshes

This commit is contained in:
Campbell Barton
2015-03-30 20:49:13 +11:00
parent afbc45ed93
commit 09397ac2c1

View File

@@ -786,7 +786,7 @@ static void cdDM_drawMappedFaces(DerivedMesh *dm,
if (tottri == 0) {
/* avoid buffer problems in following code */
}
if (setDrawOptions == NULL) {
else if (setDrawOptions == NULL) {
/* just draw the entire face array */
glDrawArrays(GL_TRIANGLES, 0, (tottri) * 3);
}