From: James Turner Date: Sat, 12 Nov 2011 18:00:12 +0000 (+0000) Subject: Fix a secondary issue in bug 484 - avoid a crash when --lat, --long *and* --airport... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=c92a3313bc0ad3f175f0e5701c2182d5f0c6b19d;p=flightgear.git Fix a secondary issue in bug 484 - avoid a crash when --lat, --long *and* --airport were specified. ATCmgr assumes /sim/atc/runway is set in this case, but it is not, leading the a runway-not-found assert. --- diff --git a/src/ATC/atc_mgr.cxx b/src/ATC/atc_mgr.cxx index 22e5db5e8..33d90a9a4 100644 --- a/src/ATC/atc_mgr.cxx +++ b/src/ATC/atc_mgr.cxx @@ -100,7 +100,7 @@ void FGATCManager::init() { FGAirport *apt = FGAirport::findByIdent(airport); - if (apt && onGround) { + if (apt && onGround && !runway.empty()) { FGAirportDynamics* dcs = apt->getDynamics(); int park_index = dcs->getNrOfParkings() - 1; //cerr << "found information: " << runway << " " << airport << ": parking = " << parking << endl;