1
0
Fork 0

Launcher: Don't probe for states if the -set.xml is missing

This showed up as frequent exceptions from readProperties in the
launcher, when checking for states.

Sentry-Id: FLIGHTGEAR-2R
This commit is contained in:
Automatic Release Builder 2020-09-28 09:44:47 +01:00 committed by James Turner
parent eb1d8a7dc8
commit 191786d9a0

View file

@ -601,7 +601,14 @@ void QmlAircraftInfo::checkForStates()
return;
}
auto states = readAircraftStates(SGPath::fromUtf8(path.toUtf8().toStdString()));
const auto sgp = SGPath::fromUtf8(path.toUtf8().toStdString());
if (!sgp.exists()) {
_statesModel.reset(new StatesModel);
emit infoChanged();
return;
}
auto states = readAircraftStates(sgp);
if (states.empty()) {
_statesModel.reset(new StatesModel);
emit infoChanged();