From dd62489f5e635029492309010e8f2d43bd857855 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Fri, 15 Mar 2019 11:00:13 +1100 Subject: [PATCH] AC_PrecLand: stop ignoring return values on methods --- libraries/SITL/SIM_Precland.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libraries/SITL/SIM_Precland.cpp b/libraries/SITL/SIM_Precland.cpp index fb2a32c072..d4cabe072d 100644 --- a/libraries/SITL/SIM_Precland.cpp +++ b/libraries/SITL/SIM_Precland.cpp @@ -131,7 +131,10 @@ void SIM_Precland::update(const Location &loc, const Vector3f &position) static_cast(_origin_height), Location::AltFrame::ABOVE_HOME); Vector2f center; - origin_center.get_vector_xy_from_origin_NE(center); + if (!origin_center.get_vector_xy_from_origin_NE(center)) { + _healthy = false; + return; + } center = center * 0.01f; // cm to m switch (_type) {