Skip to content

Commit

Permalink
fix(behavior_velocity_planner): fix invalid access (#3187)
Browse files Browse the repository at this point in the history
Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>
  • Loading branch information
takayuki5168 authored Mar 28, 2023
1 parent 1ef312b commit 1ed2648
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 1ed2648

Please sign in to comment.