mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-08 17:08:28 -04:00
AP_NavEKF2: protect against null beacon
This commit is contained in:
parent
51ccfca31c
commit
1f4606e48a
@ -658,6 +658,11 @@ void NavEKF2_core::readRngBcnData()
|
||||
// get the location of the beacon data
|
||||
const AP_Beacon *beacon = _ahrs->get_beacon();
|
||||
|
||||
// exit immediately if no beacon object
|
||||
if (beacon == nullptr) {
|
||||
return;
|
||||
}
|
||||
|
||||
// get the number of beacons in use
|
||||
N_beacons = beacon->count();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user