diff --git a/ArduPlane/altitude.pde b/ArduPlane/altitude.pde index 66ea208233..24b8065eec 100644 --- a/ArduPlane/altitude.pde +++ b/ArduPlane/altitude.pde @@ -357,9 +357,11 @@ static bool above_location_current(const Location &loc) */ static void setup_terrain_target_alt(Location &loc) { +#if AP_TERRAIN_AVAILABLE if (g.terrain_follow) { loc.flags.terrain_alt = true; } +#endif } /*