See bug issue #177 for more.
Also fix minor compiler warning.
}
int index = aIndex;
- if ((aIndex == -1) || (aIndex > _route.size())) {
+ if ((aIndex == -1) || (aIndex > (int) _route.size())) {
index = _route.size();
}
void FGRouteMgr::currentWaypointChanged()
{
- Waypt* cur = currentWaypt();
+ Waypt* cur = (_currentIndex<numWaypts()) ? currentWaypt() : NULL;
Waypt* next = nextWaypt();
wp0->getChild("id")->setStringValue(cur ? cur->ident() : "");