From f32656b2a5b567a0725e5ef2e2c254bd4f090185 Mon Sep 17 00:00:00 2001 From: ThorstenB Date: Fri, 21 Jan 2011 23:44:23 +0100 Subject: [PATCH] Fix crash in GPS module. Fixes crash on exit (during property untie). Also potential run-time crash. --- src/Instrumentation/gps.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Instrumentation/gps.cxx b/src/Instrumentation/gps.cxx index 853d49d46..f0ecf6f04 100644 --- a/src/Instrumentation/gps.cxx +++ b/src/Instrumentation/gps.cxx @@ -1158,7 +1158,7 @@ double GPS::getWP1Bearing() const double GPS::getWP1MagBearing() const { - if (!_dataValid) { + if (!_dataValid || !_wayptController.get()) { return -9999.0; } -- 2.39.5