From: ThorstenB Date: Fri, 21 Jan 2011 22:44:23 +0000 (+0100) Subject: Fix crash in GPS module. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=f32656b2a5b567a0725e5ef2e2c254bd4f090185;p=flightgear.git Fix crash in GPS module. Fixes crash on exit (during property untie). Also potential run-time crash. --- 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; }