Commit 06077355 authored by Uwe Woessner's avatar Uwe Woessner
Browse files

fixed vector out of bounds access


Signed-off-by: Uwe Woessner's avatarhpcwoess <woessner@hlrs.de>
parent 63746e7a
......@@ -938,7 +938,12 @@ RouteQueryResult<RelativeWorldView::Lanes> WorldDataQuery::GetRelativeLanes(cons
{
currentOwnLaneId = FindNextEgoLaneId(lanesOnSection, road.inStreamDirection, previousSectionLaneIds);
}
auto lanesOnSectionLaneIds = AddLanesOfSection(lanesOnSection, road.inStreamDirection, currentOwnLaneId, previousSectionLaneIds, relativeLanes.back().lanes, laneInterval);
std::vector<RelativeWorldView::Lane> previousLames;
if (!relativeLanes.empty())
{
previousLames = relativeLanes.back().lanes;
}
auto lanesOnSectionLaneIds = AddLanesOfSection(lanesOnSection, road.inStreamDirection, currentOwnLaneId, previousSectionLaneIds, previousLames, laneInterval);
previousSectionLaneIds = lanesOnSectionLaneIds;
relativeLanes.push_back(laneInterval);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment