Obj: Change asserts to exceptions
These can be triggered by malformed input file so they can't be assertions.
This commit is contained in:
@@ -424,7 +424,9 @@ void ObjFileImporter::createVertexArray(const ObjFile::Model* pModel,
|
||||
pMesh->mTextureCoords[ 0 ][ newIndex ] = aiVector3D( coord3d.x, coord3d.y, coord3d.z );
|
||||
}
|
||||
|
||||
ai_assert( pMesh->mNumVertices > newIndex );
|
||||
if ( pMesh->mNumVertices <= newIndex ) {
|
||||
throw DeadlyImportError("OBJ: bad vertex index");
|
||||
}
|
||||
|
||||
// Get destination face
|
||||
aiFace *pDestFace = &pMesh->mFaces[ outIndex ];
|
||||
|
||||
Reference in New Issue
Block a user