Skip to content

Commit

Permalink
fix(route_handler): dereference to null cause avoidance module crash (a…
Browse files Browse the repository at this point in the history
…utowarefoundation#1098)

This crash will not appear unless drivable area boundary is added.

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
  • Loading branch information
zulfaqar-azmi-t4 authored and SoohyeokPark-MORAI committed Jun 15, 2022
1 parent 700bb50 commit d2a2a52
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions planning/route_handler/src/route_handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -938,6 +938,9 @@ lanelet::ConstLanelets RouteHandler::getAllLeftSharedLinestringLanelets(
while (lanelet_at_left) {
linestring_shared.push_back(lanelet_at_left.get());
lanelet_at_left = getLeftLanelet(lanelet_at_left.get());
if (!lanelet_at_left) {
break;
}
lanelet_at_left_opposite = getLeftOppositeLanelets(lanelet_at_left.get());
}

Expand All @@ -961,6 +964,9 @@ lanelet::ConstLanelets RouteHandler::getAllRightSharedLinestringLanelets(
while (lanelet_at_right) {
linestring_shared.push_back(lanelet_at_right.get());
lanelet_at_right = getRightLanelet(lanelet_at_right.get());
if (!lanelet_at_right) {
break;
}
lanelet_at_right_opposite = getRightOppositeLanelets(lanelet_at_right.get());
}

Expand Down

0 comments on commit d2a2a52

Please sign in to comment.