Skip to content

Commit df49f1b

Browse files
hlgaothms
authored andcommitted
prevent index out of bound in case of a single point
1 parent acde878 commit df49f1b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/ifcgeom/IfcGeomWires.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -912,7 +912,7 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcIndexedPolyCurve* l, TopoDS_Wi
912912
throw IfcParse::IfcException("Unexpected IfcIndexedPolyCurve segment of type " + IfcSchema::Type::ToString(segment->type()));
913913
}
914914
}
915-
} else {
915+
} else if (points.begin() < points.end()) {
916916
std::vector<gp_Pnt>::const_iterator previous = points.begin();
917917
for (std::vector<gp_Pnt>::const_iterator current = previous+1; current < points.end(); ++current){
918918
w.Add(BRepBuilderAPI_MakeEdge(*previous, *current));

0 commit comments

Comments
 (0)