From 63735fe7819642a175abde2a6d45a2473f89d1c0 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Fri, 16 Apr 2004 22:10:25 +0000 Subject: [PATCH] fix crash on empty model due to meshInfo.iVertexStart+meshInfo.iVertexCount-1 < meshInfo.iVertexStart --- stepmania/src/RageDisplay_OGL.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stepmania/src/RageDisplay_OGL.cpp b/stepmania/src/RageDisplay_OGL.cpp index c8e1f5891b..243ebedc18 100644 --- a/stepmania/src/RageDisplay_OGL.cpp +++ b/stepmania/src/RageDisplay_OGL.cpp @@ -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 );