Merge pull request #2814 from assimp/issue_2809

closes https://github.com/assimp/assimp/issues/2809: fix crash for sp…
pull/2815/head
Kim Kulling 2019-12-08 12:58:28 +01:00 committed by GitHub
commit d8575b2b55
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -138,8 +138,9 @@ void ProcessPolygonBoundaries(TempMesh& result, const TempMesh& inmesh, size_t m
}
}
}
ai_assert(outer_polygon_it != end);
if (outer_polygon_it == end) {
return;
}
const size_t outer_polygon_size = *outer_polygon_it;
const IfcVector3& master_normal = normals[std::distance(begin, outer_polygon_it)];