From d438a180abea9f0864ecaf1293644ca297e0f1fe Mon Sep 17 00:00:00 2001 From: ThorstenB Date: Sat, 27 Nov 2010 20:05:28 +0100 Subject: [PATCH] Fix route manager exception and following crash (may fix #177) See bug issue #177 for more. Also fix minor compiler warning. --- src/Autopilot/route_mgr.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Autopilot/route_mgr.cxx b/src/Autopilot/route_mgr.cxx index d5411b8af..c0f8f2631 100644 --- a/src/Autopilot/route_mgr.cxx +++ b/src/Autopilot/route_mgr.cxx @@ -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 = (_currentIndexgetChild("id")->setStringValue(cur ? cur->ident() : ""); -- 2.39.5