|
@@ -448,6 +448,10 @@ void ObjFileImporter::createVertexArray(const ObjFile::Model* pModel,
|
|
throw DeadlyImportError( "OBJ: vertex index out of range" );
|
|
throw DeadlyImportError( "OBJ: vertex index out of range" );
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if ( pMesh->mNumVertices <= newIndex ) {
|
|
|
|
+ throw DeadlyImportError("OBJ: bad vertex index");
|
|
|
|
+ }
|
|
|
|
+
|
|
pMesh->mVertices[ newIndex ] = pModel->m_Vertices[ vertex ];
|
|
pMesh->mVertices[ newIndex ] = pModel->m_Vertices[ vertex ];
|
|
|
|
|
|
// Copy all normals
|
|
// Copy all normals
|
|
@@ -479,10 +483,6 @@ void ObjFileImporter::createVertexArray(const ObjFile::Model* pModel,
|
|
pMesh->mTextureCoords[ 0 ][ newIndex ] = aiVector3D( coord3d.x, coord3d.y, coord3d.z );
|
|
pMesh->mTextureCoords[ 0 ][ newIndex ] = aiVector3D( coord3d.x, coord3d.y, coord3d.z );
|
|
}
|
|
}
|
|
|
|
|
|
- if ( pMesh->mNumVertices <= newIndex ) {
|
|
|
|
- throw DeadlyImportError("OBJ: bad vertex index");
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
// Get destination face
|
|
// Get destination face
|
|
aiFace *pDestFace = &pMesh->mFaces[ outIndex ];
|
|
aiFace *pDestFace = &pMesh->mFaces[ outIndex ];
|
|
|
|
|