X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FFDM%2FJSBSim%2Fmodels%2FFGFCS.cpp;h=3d974bf6e74aa171023d8bdc0ae2236b459fe0e1;hb=1e71177e7c1e9622d2346f168c9fdd479ad1a7cf;hp=95abe9ebb24c605784e71d41867b770c531be64c;hpb=b7ebc7d78dbf320d432bad3ed0e384b2e1308eed;p=flightgear.git diff --git a/src/FDM/JSBSim/models/FGFCS.cpp b/src/FDM/JSBSim/models/FGFCS.cpp index 95abe9ebb..3d974bf6e 100644 --- a/src/FDM/JSBSim/models/FGFCS.cpp +++ b/src/FDM/JSBSim/models/FGFCS.cpp @@ -46,7 +46,6 @@ INCLUDES #include #include #include -#include #include #include #include @@ -514,6 +513,10 @@ bool FGFCS::Load(Element* el, SystemType systype) return false; } else { document = LoadXMLDocument(file); + if (!document) { + cerr << "Error loading file " << file << endl; + return false; + } name = document->GetAttributeValue("name"); } } else { @@ -551,7 +554,7 @@ bool FGFCS::Load(Element* el, SystemType systype) } // After reading interface properties in a file, read properties in the local - // flight_control, autopiot, or system element. This allows general-purpose + // flight_control, autopilot, or system element. This allows general-purpose // systems to be defined in a file, with overrides or initial loaded constants // supplied in the relevant element of the aircraft configuration file. @@ -967,7 +970,7 @@ void FGFCS::Debug(int from) if (debug_lvl & 1) { // Standard console startup message output if (from == 2) { // Loader - cout << endl << " Flight Control (" << Name << ")" << endl; + cout << endl << " " << Name << endl; } } if (debug_lvl & 2 ) { // Instantiation/Destruction notification