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:
parent
e9e1607fce
commit
83c8c7e0c3
2 changed files with 7 additions and 3 deletions
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue