diff --git a/src/Airports/runwayprefs.cxx b/src/Airports/runwayprefs.cxx index 12ab521e5..f0d203211 100644 --- a/src/Airports/runwayprefs.cxx +++ b/src/Airports/runwayprefs.cxx @@ -349,6 +349,10 @@ void RunwayGroup::setActive(const FGAirport * airport, return; } } + + // failed to find any valid runways + active = -1; + nrActive = 0; } void RunwayGroup::getActive(int i, std::string & name, std::string & type) diff --git a/src/Airports/runwayprefs.hxx b/src/Airports/runwayprefs.hxx index ef426f654..8ce66ad8c 100644 --- a/src/Airports/runwayprefs.hxx +++ b/src/Airports/runwayprefs.hxx @@ -89,12 +89,12 @@ class RunwayGroup private: std::string name; RunwayListVec rwyList; - int active; + int active = -1; //stringVec runwayNames; int choice[2]; - int nrActive; + int nrActive = 0; -public: + public: RunwayGroup() {}; RunwayGroup(const RunwayGroup &other); RunwayGroup &operator= (const RunwayGroup &other);