Added sanity check for zero vertices.

This commit is contained in:
Andrzej Kapolka 2014-02-14 13:11:16 -08:00
parent 76142c92f2
commit af0d395751

View file

@ -806,6 +806,10 @@ void Model::renderMeshes(float alpha, bool translucent) {
const FBXMesh& mesh = geometry.meshes.at(i);
int vertexCount = mesh.vertices.size();
if (vertexCount == 0) {
// sanity check
continue;
}
const_cast<QOpenGLBuffer&>(networkMesh.vertexBuffer).bind();