diff --git a/libraries/AP_CANManager/AP_CANManager.h b/libraries/AP_CANManager/AP_CANManager.h index 0cc569cef8..cb4dfba37b 100644 --- a/libraries/AP_CANManager/AP_CANManager.h +++ b/libraries/AP_CANManager/AP_CANManager.h @@ -36,6 +36,9 @@ public: static AP_CANManager* get_singleton() { + if (_singleton == nullptr) { + AP_HAL::panic("CANManager used before allocation."); + } return _singleton; }