diff --git a/src/osgSim/ElevationSlice.cpp b/src/osgSim/ElevationSlice.cpp index bdc4f193a..ce035742e 100644 --- a/src/osgSim/ElevationSlice.cpp +++ b/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;