mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-21 16:18:29 -04:00
AP_Vehicle: check for motors being nullptr
this can happen with plane with Q_ENABLE=0
This commit is contained in:
parent
8fb00f02f4
commit
1796cd5394
@ -485,7 +485,7 @@ void AP_Vehicle::update_dynamic_notch(AP_InertialSensor::HarmonicNotch ¬ch)
|
||||
}
|
||||
|
||||
const AP_Motors* motors = AP::motors();
|
||||
if (motors->get_spool_state() == AP_Motors::SpoolState::SHUT_DOWN) {
|
||||
if (motors != nullptr && motors->get_spool_state() == AP_Motors::SpoolState::SHUT_DOWN) {
|
||||
notch.set_inactive(true);
|
||||
} else {
|
||||
notch.set_inactive(false);
|
||||
|
Loading…
Reference in New Issue
Block a user