Skip to content

Commit

Permalink
fix(system_error_monitor): avoid invalid access to nullptr (#5729)
Browse files Browse the repository at this point in the history
Signed-off-by: tomoya.kimura <[email protected]>
  • Loading branch information
tkimura4 authored Dec 1, 2023
1 parent 0bf4204 commit 07f57c2
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,9 @@ bool AutowareErrorMonitor::onClearEmergencyService(
void AutowareErrorMonitor::loggingErrors(
const autoware_auto_system_msgs::msg::HazardStatus & hazard_status)
{
if (isInNoFaultCondition(*autoware_state_, *current_gate_mode_)) {
if (
autoware_state_ && current_gate_mode_ &&
isInNoFaultCondition(*autoware_state_, *current_gate_mode_)) {
RCLCPP_DEBUG(get_logger(), "Autoware is in no-fault condition.");
return;
}
Expand Down

0 comments on commit 07f57c2

Please sign in to comment.