AP_NavEKF3: fixed null dereference of airspeed
this caused a segfault in replay
This commit is contained in:
parent
2071a19a40
commit
ac4a05ffbf
@ -46,7 +46,7 @@ float NavEKF3_core::errorScore() const
|
||||
// EKF less sensitive to innovations arising due events like strong gusts of wind, thus, prevent reporting high error scores
|
||||
if (assume_zero_sideslip()) {
|
||||
const auto *arsp = dal.airspeed();
|
||||
if (arsp->get_num_sensors() >= 2 && (frontend->_affinity & EKF_AFFINITY_ARSP)) {
|
||||
if (arsp != nullptr && arsp->get_num_sensors() >= 2 && (frontend->_affinity & EKF_AFFINITY_ARSP)) {
|
||||
score = MAX(score, 0.3f * tasTestRatio);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user