1
0
Fork 0

Fix for missing 2D panel

Should be back-ported to 2020.3

Sentry-Id: FLIGHTGEAR-5X
This commit is contained in:
James Turner 2020-10-29 16:19:45 +00:00
parent 77d7476ba6
commit 801ddc59f8

View file

@ -843,6 +843,12 @@ fgReadPanel (const string &relative_path)
SGPath path = globals->resolve_aircraft_path(relative_path); SGPath path = globals->resolve_aircraft_path(relative_path);
SGPropertyNode root; SGPropertyNode root;
if (!path.exists()) {
auto msg = string{"Missing panel file: "} + relative_path;
guiErrorMessage(msg.c_str());
return nullptr;
}
try { try {
readProperties(path, &root); readProperties(path, &root);
} catch (const sg_exception &e) { } catch (const sg_exception &e) {