Fix a package crash on startup.
This commit is contained in:
parent
2314ccfe13
commit
ca1f8cddc9
1 changed files with 5 additions and 2 deletions
|
@ -546,9 +546,11 @@ int fgInitAircraft(bool reinit)
|
|||
// code in FindAndCacheAircraft works as normal
|
||||
// note since we may be using a variant, we can't use the package ID
|
||||
size_t lastDot = aircraftId.rfind('.');
|
||||
assert(lastDot != std::string::npos);
|
||||
aircraftId = aircraftId.substr(lastDot + 1);
|
||||
if (lastDot == std::string::npos) {
|
||||
aircraftId = aircraftId.substr(lastDot + 1);
|
||||
}
|
||||
aircraftProp->setStringValue(aircraftId);
|
||||
|
||||
// run the traditional-code path below
|
||||
} else {
|
||||
#if 0
|
||||
|
@ -559,6 +561,7 @@ int fgInitAircraft(bool reinit)
|
|||
|
||||
return flightgear::FG_OPTIONS_ERROR;
|
||||
#endif
|
||||
// fall back the default aircraft instead
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue