Added check against any empty _segments to avoid undefined behaviour
This commit is contained in:
parent
ab95a79540
commit
faa2b1d964
@ -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