]> git.mxchange.org Git - flightgear.git/commitdiff
Fix for an uninitialised value, reported by Dave Luff.
authorjmt <jmt>
Wed, 21 Oct 2009 22:47:29 +0000 (22:47 +0000)
committerTim Moore <timoore@redhat.com>
Thu, 22 Oct 2009 21:21:34 +0000 (23:21 +0200)
src/Instrumentation/gps.cxx

index 43646cbf0e9e2ab815a49058220fd0d1d3cda8b7..1ef7dfcd1d0d6b6ddb587dbe21e051bf202e823e 100644 (file)
@@ -281,6 +281,7 @@ GPS::Config::setExternalCourse(double aCourseDeg)
 ////////////////////////////////////////////////////////////////////////////
 
 GPS::GPS ( SGPropertyNode *node) : 
+  _selectedCourse(0.0),
   _dataValid(false),
   _lastPosValid(false),
   _mode("init"),
@@ -559,6 +560,9 @@ GPS::update (double delta_time_sec)
   if (_dataValid && (_mode == "init")) {
     // allow a realistic delay in the future, here
     SG_LOG(SG_INSTR, SG_INFO, "GPS initialisation complete");
+    
+    _selectedCourse = _config.getExternalCourse();
+    
     if (_route_active_node->getBoolValue()) {
       // GPS init with active route
       SG_LOG(SG_INSTR, SG_INFO, "GPS init with active route");