Skip to content

Commit

Permalink
fix(behavior_path_planner): getAvoidanceDebugMsgArray caused crash (t…
Browse files Browse the repository at this point in the history
…ier4#828)

this is due to the assignment to pointer without guards in the function

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
  • Loading branch information
zulfaqar-azmi-t4 authored and boyali committed Oct 19, 2022
1 parent a3b5a40 commit 4714fee
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,9 @@ class SceneModuleInterface

AvoidanceDebugMsgArray::SharedPtr getAvoidanceDebugMsgArray()
{
debug_avoidance_msg_array_ptr_->header.stamp = clock_->now();
if (debug_avoidance_msg_array_ptr_) {
debug_avoidance_msg_array_ptr_->header.stamp = clock_->now();
}
return debug_avoidance_msg_array_ptr_;
}

Expand Down

0 comments on commit 4714fee

Please sign in to comment.