diff --git a/src/AIModel/submodel.cxx b/src/AIModel/submodel.cxx index d0df17275..9f939319b 100644 --- a/src/AIModel/submodel.cxx +++ b/src/AIModel/submodel.cxx @@ -484,6 +484,11 @@ void FGSubmodelMgr::setData(int id, const string& path, bool serviceable, const SGPropertyNode root; SGPath config = globals->resolve_aircraft_path(path); + if (!config.exists()) { + SG_LOG(SG_AI, SG_DEV_ALERT, "missing AI submodels file: " << config); + return; + } + try { SG_LOG(SG_AI, SG_DEBUG, "Submodels: Trying to read AI submodels file: " << config); diff --git a/src/Cockpit/cockpitDisplayManager.cxx b/src/Cockpit/cockpitDisplayManager.cxx index 2bad7accb..a706cb69c 100644 --- a/src/Cockpit/cockpitDisplayManager.cxx +++ b/src/Cockpit/cockpitDisplayManager.cxx @@ -63,6 +63,11 @@ void CockpitDisplayManager::init() } SGPath config = globals->resolve_aircraft_path(path_n->getStringValue()); + if (!config.exists()) { + SG_LOG(SG_COCKPIT, SG_DEV_ALERT, "CockpitDisplaysManager: Missing instrumentation file at:" << config); + return; + } + SG_LOG( SG_COCKPIT, SG_INFO, "Reading cockpit displays from " << config ); try { diff --git a/src/Instrumentation/instrument_mgr.cxx b/src/Instrumentation/instrument_mgr.cxx index ff978e176..dd71a0f76 100644 --- a/src/Instrumentation/instrument_mgr.cxx +++ b/src/Instrumentation/instrument_mgr.cxx @@ -73,6 +73,11 @@ void FGInstrumentMgr::init() } SGPath config = globals->resolve_aircraft_path(path_n->getStringValue()); + if (!config.exists()) { + SG_LOG(SG_COCKPIT, SG_DEV_ALERT, "Missing instrumentation file at:" << config); + return; + } + SG_LOG( SG_COCKPIT, SG_INFO, "Reading instruments from " << config ); try { diff --git a/src/Systems/system_mgr.cxx b/src/Systems/system_mgr.cxx index 27694f992..954137a17 100644 --- a/src/Systems/system_mgr.cxx +++ b/src/Systems/system_mgr.cxx @@ -36,6 +36,10 @@ FGSystemMgr::FGSystemMgr () if (path_n) { SGPath config = globals->resolve_aircraft_path(path_n->getStringValue()); + if (!config.exists()) { + SG_LOG( SG_SYSTEMS, SG_DEV_ALERT, "System model file not found:" << config); + return; + } SG_LOG( SG_SYSTEMS, SG_INFO, "Reading systems from " << config );