Added check against any empty _segments to avoid undefined behaviour
This commit is contained in:
parent
e327fc16df
commit
d562587858
@ -1092,6 +1092,8 @@ struct LineConstructor
|
||||
|
||||
void copyPoints(ElevationSlice::Vec3dList& intersections, ElevationSlice::DistanceHeightList& distanceHeightIntersections)
|
||||
{
|
||||
if (_segments.empty()) return;
|
||||
|
||||
SegmentSet::iterator prevItr = _segments.begin();
|
||||
SegmentSet::iterator nextItr = prevItr;
|
||||
++nextItr;
|
||||
|
Loading…
Reference in New Issue
Block a user