closes https://github.com/assimp/assimp/issues/1728: check if mesh is…
@@ -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);