1
0
Fork 0

RunwayPrefs: fix an edge case (at KORD)

If we reject all preferences due to missing runways, don’t end up
with un-initialized values.
This commit is contained in:
James Turner 2020-12-06 18:43:04 +00:00
parent e9e1607fce
commit 83c8c7e0c3
2 changed files with 7 additions and 3 deletions

View file

@ -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)

View file

@ -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);