diff --git a/src/ifcgeom/mapping/IfcCurveSegment.cpp b/src/ifcgeom/mapping/IfcCurveSegment.cpp index 05b9f5d538..4722621116 100644 --- a/src/ifcgeom/mapping/IfcCurveSegment.cpp +++ b/src/ifcgeom/mapping/IfcCurveSegment.cpp @@ -106,6 +106,7 @@ class segment_geometry_adjuster { // Get the parent of this segment. If it is a IfcGradientCurve or IfcSegmentedRefernceCurve // look for the optional EndPoint attribute auto curves = inst->UsingCurves(); +if (curves && curves->size() { auto curve = *curves->begin(); const IfcSchema::IfcPlacement* placement = nullptr; if (curve->as()) { @@ -118,6 +119,7 @@ class segment_geometry_adjuster { if (placement) { start_of_next_inst_ = taxonomy::cast(mapping->map(placement))->ccomponents(); } +} } }