Merge pull request #4017 from mahiuchun/bound

Obj: make a predicate more robust.
pull/4032/head^2
Kim Kulling 2021-08-16 20:59:37 +02:00 committed by GitHub
commit c28aab2ed6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -468,7 +468,7 @@ void ObjFileImporter::createVertexArray(const ObjFile::Model *pModel,
}
// Copy all vertex colors
if (!pModel->m_VertexColors.empty()) {
if (vertex < pModel->m_VertexColors.size()) {
const aiVector3D &color = pModel->m_VertexColors[vertex];
pMesh->mColors[0][newIndex] = aiColor4D(color.x, color.y, color.z, 1.0);
}