fix crash on empty model due to meshInfo.iVertexStart+meshInfo.iVertexCount-1 < meshInfo.iVertexStart

This commit is contained in:
Glenn Maynard
2004-04-16 22:10:25 +00:00
parent 29af57002c
commit 63735fe781
+2
View File
@@ -1178,6 +1178,8 @@ void RageCompiledGeometryHWOGL::Draw( int iMeshIndex ) const
FlushGLErrors();
const MeshInfo& meshInfo = m_vMeshInfo[iMeshIndex];
if( !meshInfo.iVertexCount || !meshInfo.iTriangleCount )
return;
glEnableClientState(GL_VERTEX_ARRAY);
GLExt::glBindBufferARB( GL_ARRAY_BUFFER_ARB, m_nPositions );