Skip to content

Commit a6003cf

Browse files
authored
fix(intersection): fix possible invalid access (autowarefoundation#6542)
Signed-off-by: Mamoru Sobue <mamoru.sobue@tier4.jp>
1 parent c3199b7 commit a6003cf

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

planning/behavior_velocity_intersection_module/src/scene_intersection_stuck.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ lanelet::LineString3d getLineStringFromArcLength(
3434
lanelet::Points3d points;
3535
double accumulated_length = 0;
3636
size_t start_index = linestring.size();
37+
if (start_index == 0) {
38+
return lanelet::LineString3d{lanelet::InvalId, points};
39+
}
3740
for (size_t i = 0; i < linestring.size() - 1; i++) {
3841
const auto & p1 = linestring[i];
3942
const auto & p2 = linestring[i + 1];

0 commit comments

Comments
 (0)