AP_Arming: correct compilation when AP_MISSION_ENABLED is false

This commit is contained in:
Peter Barker 2023-12-09 15:09:55 +11:00 committed by Peter Barker
parent 17f311ef32
commit 6d2c857db9

View File

@ -1125,6 +1125,7 @@ bool AP_Arming::system_checks(bool report)
bool AP_Arming::terrain_database_required() const bool AP_Arming::terrain_database_required() const
{ {
#if AP_MISSION_ENABLED
AP_Mission *mission = AP::mission(); AP_Mission *mission = AP::mission();
if (mission == nullptr) { if (mission == nullptr) {
// no mission support? // no mission support?
@ -1133,6 +1134,7 @@ bool AP_Arming::terrain_database_required() const
if (mission->contains_terrain_alt_items()) { if (mission->contains_terrain_alt_items()) {
return true; return true;
} }
#endif
return false; return false;
} }