1
0
Fork 0

Exit on startup if defaults.xml is corrupted

This commit is contained in:
Lars Toenning 2020-05-21 22:02:32 +02:00 committed by James Turner
parent fffcd14362
commit f3edffd42b

View file

@ -676,7 +676,13 @@ int fgInitConfig ( int argc, char **argv, bool reinit )
defaultsXML.utf8Str());
}
fgLoadProps("defaults.xml", globals->get_props());
if(!fgLoadProps("defaults.xml", globals->get_props()))
{
flightgear::fatalMessageBoxThenExit(
"Corrupted file",
"Couldn't load an essential simulator data file as it is corrupted.",
defaultsXML.utf8Str());
}
SG_LOG(SG_GENERAL, SG_DEBUG, "Finished Reading global defaults");
// do not load user settings when reset to default is requested, or if