From e3da92f7d3ae5f1a783b140a984f8c73b20aa8fe Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Sun, 8 Dec 2019 10:12:14 +0100 Subject: [PATCH] closes https://github.com/assimp/assimp/issues/2809: fix crash for special ifc file. --- code/Importer/IFC/IFCGeometry.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/code/Importer/IFC/IFCGeometry.cpp b/code/Importer/IFC/IFCGeometry.cpp index d1c7aee19..7949f9a58 100644 --- a/code/Importer/IFC/IFCGeometry.cpp +++ b/code/Importer/IFC/IFCGeometry.cpp @@ -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)];