]> git.mxchange.org Git - flightgear.git/blobdiff - src/Instrumentation/gps.cxx
Bugfix: don't crash on localizers with no associated runway (due to inconsistent...
[flightgear.git] / src / Instrumentation / gps.cxx
index bb15a34db5eb33798cf2e1d969c6c1768af4f52c..2c6f36495882344acf8d2b10ddfe32bfaec72c66 100644 (file)
@@ -1021,9 +1021,7 @@ void GPS::wp1Changed()
   }
   
   double altFt = _wp1_position.getElevationFt();
-  if (altFt < -9990.0) {
-    _apTargetAltitudeFt->setDoubleValue(0.0);
-  } else {
+  if (altFt > -9990.0) {
     _apTargetAltitudeFt->setDoubleValue(altFt);
   }
 }