From 4714fee743a651f65d52a0926abbf513a3a3b58e Mon Sep 17 00:00:00 2001 From: Zulfaqar Azmi <93502286+zulfaqar-azmi-t4@users.noreply.github.com> Date: Thu, 28 Apr 2022 15:57:59 +0900 Subject: [PATCH] fix(behavior_path_planner): getAvoidanceDebugMsgArray caused crash (#828) this is due to the assignment to pointer without guards in the function Signed-off-by: Muhammad Zulfaqar Azmi --- .../scene_module/scene_module_interface.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/planning/behavior_path_planner/include/behavior_path_planner/scene_module/scene_module_interface.hpp b/planning/behavior_path_planner/include/behavior_path_planner/scene_module/scene_module_interface.hpp index 65aa08d84f2a9..82e8e8da1f3f0 100644 --- a/planning/behavior_path_planner/include/behavior_path_planner/scene_module/scene_module_interface.hpp +++ b/planning/behavior_path_planner/include/behavior_path_planner/scene_module/scene_module_interface.hpp @@ -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_; }