- accept invalid/missing airport IDs when starting ATC
FGAirportRef apt(FGAirport::findByIdent(icao));
if (!apt)
- throw sg_exception("dynamicsForICAO: Invalid ICAO:" + icao);
+ return FGAirportDynamicsRef();
+
FGAirportDynamicsRef d(new FGAirportDynamics(apt));
XMLLoader::load(d.ptr());
FGAirportDynamicsRef AirportDynamicsManager::find(const std::string &icao)
{
+ if (icao.empty())
+ return FGAirportDynamicsRef();
+
AirportDynamicsManager* instance = static_cast<AirportDynamicsManager*>(globals->get_subsystem("airport-dynamics"));
if (!instance)
return FGAirportDynamicsRef();