]> git.mxchange.org Git - flightgear.git/blobdiff - src/Autopilot/route_mgr.cxx
Fix bug 191, uninitialised HUD color.
[flightgear.git] / src / Autopilot / route_mgr.cxx
index fac7dc628f39ee84d32ffc54de37226d040fad15..c0f8f26318f33315e505199b9892e8b0855f2344 100644 (file)
@@ -237,7 +237,7 @@ void FGRouteMgr::postinit()
     SG_LOG(SG_AUTOPILOT, SG_INFO, "loaded initial waypoints:" << _route.size());
   }
 
-  weightOnWheels = fgGetNode("/gear/gear[0]/wow", false);
+  weightOnWheels = fgGetNode("/gear/gear[0]/wow", true);
   // check airbone flag agrees with presets
 }
 
@@ -673,7 +673,7 @@ void FGRouteMgr::insertWayptAtIndex(Waypt* aWpt, int aIndex)
   }
   
   int index = aIndex;
-  if ((aIndex == -1) || (aIndex > _route.size())) {
+  if ((aIndex == -1) || (aIndex > (int) _route.size())) {
     index = _route.size();
   }
   
@@ -1027,7 +1027,7 @@ void FGRouteMgr::jumpToIndex(int index)
 
 void FGRouteMgr::currentWaypointChanged()
 {
-  Waypt* cur = currentWaypt();
+  Waypt* cur = (_currentIndex<numWaypts()) ? currentWaypt() : NULL;
   Waypt* next = nextWaypt();
 
   wp0->getChild("id")->setStringValue(cur ? cur->ident() : "");