Fix a segfault that became apparent with a 850 apt.dat file
This commit is contained in:
parent
dbda2fb95d
commit
ede92fce54
1 changed files with 23 additions and 18 deletions
|
@ -478,6 +478,9 @@ private:
|
|||
int freqKhz = atoi(token[1].c_str());
|
||||
int rangeNm = 50;
|
||||
FGPositioned::Type ty;
|
||||
// Make sure we only pass on stations with at least a name
|
||||
if (token.size() >2){
|
||||
|
||||
switch (lineId) {
|
||||
case 50:
|
||||
ty = FGPositioned::FREQ_AWOS;
|
||||
|
@ -498,6 +501,8 @@ private:
|
|||
|
||||
commStations.push_back(new flightgear::CommStation(token[2], ty, pos, rangeNm, freqKhz));
|
||||
}
|
||||
else SG_LOG( SG_GENERAL, SG_DEBUG, "Found unnamed comm. Skipping: " << lineId);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue