fix crash on empty model due to meshInfo.iVertexStart+meshInfo.iVertexCount-1 < meshInfo.iVertexStart
This commit is contained in:
@@ -1178,6 +1178,8 @@ void RageCompiledGeometryHWOGL::Draw( int iMeshIndex ) const
|
|||||||
FlushGLErrors();
|
FlushGLErrors();
|
||||||
|
|
||||||
const MeshInfo& meshInfo = m_vMeshInfo[iMeshIndex];
|
const MeshInfo& meshInfo = m_vMeshInfo[iMeshIndex];
|
||||||
|
if( !meshInfo.iVertexCount || !meshInfo.iTriangleCount )
|
||||||
|
return;
|
||||||
|
|
||||||
glEnableClientState(GL_VERTEX_ARRAY);
|
glEnableClientState(GL_VERTEX_ARRAY);
|
||||||
GLExt::glBindBufferARB( GL_ARRAY_BUFFER_ARB, m_nPositions );
|
GLExt::glBindBufferARB( GL_ARRAY_BUFFER_ARB, m_nPositions );
|
||||||
|
|||||||
Reference in New Issue
Block a user