Browse Source

closes https://github.com/assimp/assimp/issues/2809: fix crash for special ifc file.

Kim Kulling 5 years ago
parent
commit
e3da92f7d3
1 changed files with 3 additions and 2 deletions
  1. 3 2
      code/Importer/IFC/IFCGeometry.cpp

+ 3 - 2
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)];