diff --git a/src/IndexedMesh.cpp b/src/IndexedMesh.cpp index 4ef22584d..b64885fae 100644 --- a/src/IndexedMesh.cpp +++ b/src/IndexedMesh.cpp @@ -33,6 +33,8 @@ IndexedMesh* IndexedMesh::setIndexBuffer(Buffer* buffer) { } void IndexedMesh::draw() { + if(!_indexCount) return; + bind(); /** @todo Start at given index */ diff --git a/src/Mesh.cpp b/src/Mesh.cpp index 4cb19a549..93ff6917e 100644 --- a/src/Mesh.cpp +++ b/src/Mesh.cpp @@ -90,6 +90,8 @@ Mesh* Mesh::setVertexCount(GLsizei vertexCount) { } void Mesh::draw() { + if(!_vertexCount) return; + bind(); /** @todo Start at given index */