diff --git a/src/Cockpit/panel_io.cxx b/src/Cockpit/panel_io.cxx index cb12f5a7d..89134aec3 100644 --- a/src/Cockpit/panel_io.cxx +++ b/src/Cockpit/panel_io.cxx @@ -842,7 +842,13 @@ fgReadPanel (const string &relative_path) { SGPath path = globals->resolve_aircraft_path(relative_path); SGPropertyNode root; - + + if (!path.exists()) { + auto msg = string{"Missing panel file: "} + relative_path; + guiErrorMessage(msg.c_str()); + return nullptr; + } + try { readProperties(path, &root); } catch (const sg_exception &e) {