Merge pull request #1738 from assimp/issue_1728

closes https://github.com/assimp/assimp/issues/1728: check if mesh is…
pull/1737/head^2
Kim Kulling 2018-01-25 09:10:41 +01:00 committed by GitHub
commit 39ce3e1309
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -246,6 +246,10 @@ void XFileImporter::CreateMeshes( aiScene* pScene, aiNode* pNode, const std::vec
for( unsigned int a = 0; a < pMeshes.size(); a++)
{
XFile::Mesh* sourceMesh = pMeshes[a];
if ( nullptr == sourceMesh ) {
continue;
}
// first convert its materials so that we can find them with their index afterwards
ConvertMaterials( pScene, sourceMesh->mMaterials);