From 596e13b24c3cfc7448d7cd9fc0078bf3d77b1256 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Fri, 27 Sep 2019 15:12:35 +0200 Subject: [PATCH] Add null check on trimmed curve --- src/ifcgeom/IfcGeomWires.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ifcgeom/IfcGeomWires.cpp b/src/ifcgeom/IfcGeomWires.cpp index 64778fc9f9..5f929d55ba 100644 --- a/src/ifcgeom/IfcGeomWires.cpp +++ b/src/ifcgeom/IfcGeomWires.cpp @@ -559,6 +559,10 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcTrimmedCurve* l, TopoDS_Wire& e = BRepBuilderAPI_MakeEdge(pnts[0], pnts[1]).Edge(); } + if (e.IsNull()) { + return false; + } + if (isConic) { // Tiny circle segnments can cause issues later on, for example // when the comp curve is used as the sweeping directrix.