Skip to content
This repository has been archived by the owner on Jul 1, 2024. It is now read-only.

Commit

Permalink
fix(lanelet2_extension): invalid access (#240)
Browse files Browse the repository at this point in the history
  • Loading branch information
shmpwk committed Mar 4, 2024
1 parent 71e8c30 commit bb0a296
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tmp/lanelet2_extension/lib/utilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,9 @@ lanelet::LineString3d getLineStringFromArcLength(
lanelet::Points3d points;
double accumulated_length = 0;
size_t start_index = linestring.size();
if (start_index == 0) {
return lanelet::LineString3d{lanelet::InvalId, points};
}
for (size_t i = 0; i < linestring.size() - 1; i++) {
const auto & p1 = linestring[i];
const auto & p2 = linestring[i + 1];
Expand Down

0 comments on commit bb0a296

Please sign in to comment.