mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 14:38:30 -04:00
AP_CANManager: panic if can manager is used before allocation
This commit is contained in:
parent
23d9be3499
commit
8a0d98967f
@ -36,6 +36,9 @@ public:
|
|||||||
|
|
||||||
static AP_CANManager* get_singleton()
|
static AP_CANManager* get_singleton()
|
||||||
{
|
{
|
||||||
|
if (_singleton == nullptr) {
|
||||||
|
AP_HAL::panic("CANManager used before allocation.");
|
||||||
|
}
|
||||||
return _singleton;
|
return _singleton;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user