From bf4b5928dd066be4ecda370340e6372c26aa7030 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Fri, 21 Sep 2018 10:22:37 +0200 Subject: [PATCH] Fail on empty face early --- src/ifcgeom/IfcGeomFaces.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ifcgeom/IfcGeomFaces.cpp b/src/ifcgeom/IfcGeomFaces.cpp index d0bf5c8175..d2cc535f2d 100644 --- a/src/ifcgeom/IfcGeomFaces.cpp +++ b/src/ifcgeom/IfcGeomFaces.cpp @@ -106,6 +106,11 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcFace* l, TopoDS_Shape& face) { IfcSchema::IfcFaceBound::list::ptr bounds = l->Bounds(); + // Fail on this early as it can cause issues later on + if (bounds->size() == 0) { + return false; + } + Handle(Geom_Surface) face_surface; const bool is_face_surface = l->is(IfcSchema::Type::IfcFaceSurface);