Skip to content

Commit

Permalink
AP_HAL_SITL: Set NULLPTR if the preprocessor is undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
muramura committed Jul 16, 2024
1 parent 0179dc0 commit 647e718
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libraries/AP_HAL_SITL/CANSocketIface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,8 @@ bool CANIface::init(const uint32_t bitrate, const OperatingMode mode)
case SITL::SIM::CANTransport::SocketCAN:
#if HAL_CAN_WITH_SOCKETCAN
transport = NEW_NOTHROW CAN_SocketCAN();
#else
transport = nullptr;
#endif
break;
case SITL::SIM::CANTransport::None:
Expand Down

0 comments on commit 647e718

Please sign in to comment.