]> git.mxchange.org Git - flightgear.git/blobdiff - src/AIModel/AIFlightPlan.cxx
Interim windows build fix
[flightgear.git] / src / AIModel / AIFlightPlan.cxx
index eb0e6cc1f4dc03cbd3149682b64c98469d708bd1..b295310c6cdcefe91beb83298c373edb8b22bbb9 100644 (file)
@@ -41,6 +41,8 @@
 #include <Environment/environment_mgr.hxx>
 #include <Environment/environment.hxx>
 
+#include <Traffic/Schedule.hxx>
+
 #include "AIFlightPlan.hxx"
 #include "AIAircraft.hxx"
 
@@ -251,6 +253,11 @@ bool FGAIFlightPlan::parseProperties(const std::string& filename)
     wpt->setFinished   ((wpt->getName() == "END"));
     pushBackWaypoint( wpt );
   }
+  if( getLastWaypoint()->getName().compare("END") != 0  ) {
+       SG_LOG(SG_AI, SG_ALERT, "FGAIFlightPlan::Flightplan missing END node" );
+       return false;
+  }
+
   
   wpt_iterator = waypoints.begin();
   return true;