Fix for missing 2D panel
Should be back-ported to 2020.3 Sentry-Id: FLIGHTGEAR-5X
This commit is contained in:
parent
77d7476ba6
commit
801ddc59f8
1 changed files with 7 additions and 1 deletions
|
@ -842,7 +842,13 @@ 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) {
|
||||||
|
|
Loading…
Reference in a new issue