diff --git a/src/GUI/QmlAircraftInfo.cxx b/src/GUI/QmlAircraftInfo.cxx index 8d30444fd..1456a0caf 100644 --- a/src/GUI/QmlAircraftInfo.cxx +++ b/src/GUI/QmlAircraftInfo.cxx @@ -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();