Skip to content

Commit

Permalink
fix(behavior_velocity_planner): fix invalid access (autowarefoundatio…
Browse files Browse the repository at this point in the history
…n#3187)

Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>
Signed-off-by: Yusuke Mizoguchi <sky.y.m.318@gmail.com>
  • Loading branch information
takayuki5168 authored and swiftfile committed Mar 29, 2023
1 parent 46a457d commit a37ac25
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,8 @@ bool IntersectionModule::modifyPathVelocity(PathWithLaneId * path, StopReason *

/* calculate final stop lines */
std::optional<size_t> stop_line_idx =
std::make_optional<size_t>(stop_lines_idx_opt.value().collision_stop_line);
stop_lines_idx_opt ? std::make_optional<size_t>(stop_lines_idx_opt.value().collision_stop_line)
: std::nullopt;
if (external_go) {
is_entry_prohibited = false;
} else if (external_stop) {
Expand Down

0 comments on commit a37ac25

Please sign in to comment.