# Obj: add missing check for empty normals, which caused models with no or partial normal sets to fail in some cases.
git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@1010 67173fc5-114c-0410-ac8e-9d2fd5bffc1fpull/1/head
parent
d467b5bb27
commit
799ae75d67
|
@ -342,7 +342,7 @@ void ObjFileImporter::createVertexArray(const ObjFile::Model* pModel,
|
|||
pMesh->mVertices[ newIndex ] = pModel->m_Vertices[ vertex ];
|
||||
|
||||
// Copy all normals
|
||||
if ( !pSourceFace->m_pNormals->empty() )
|
||||
if ( !pSourceFace->m_pNormals->empty() && !pModel->m_Normals.empty())
|
||||
{
|
||||
const unsigned int normal = pSourceFace->m_pNormals->at( vertexIndex );
|
||||
if (normal >= pModel->m_Normals.size()) {
|
||||
|
|
Loading…
Reference in New Issue