Skip to content
Permalink
Browse files

Added check against any empty _segments to avoid undefined behaviour

  • Loading branch information...
robertosfield committed Jul 12, 2019
1 parent e327fc1 commit d562587858d21899642831df9bce5b660ecdcc06
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/osgSim/ElevationSlice.cpp
@@ -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;

0 comments on commit d562587

Please sign in to comment.
You can’t perform that action at this time.