]> git.mxchange.org Git - flightgear.git/blobdiff - src/AIModel/AIFlightPlan.cxx
warnings--
[flightgear.git] / src / AIModel / AIFlightPlan.cxx
index 493a6c3ef5741708e15fa0c30452089b389d8a9b..1ffc4328383dac203d0e49b247cee182802da06c 100644 (file)
@@ -16,7 +16,9 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
-
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
 
 #include <simgear/misc/sg_path.hxx>
 #include <simgear/debug/logstream.hxx>
@@ -47,6 +49,7 @@ FGAIFlightPlan::FGAIFlightPlan(const string& filename)
   start_time = 0;
   leg = 10;
   gateId = 0;
+  taxiRoute = 0;
   SGPath path( globals->get_fg_root() );
   path.append( ("/AI/FlightPlans/" + filename).c_str() );
   SGPropertyNode root;
@@ -108,14 +111,17 @@ FGAIFlightPlan::FGAIFlightPlan(const std::string& p,
                               const string& acType,
                               const string& airline)
 {
+  repeat = false;
   leg = 10;
   gateId=0;
+  taxiRoute = 0;
   start_time = start;
   bool useInitialWayPoint = true;
   bool useCurrentWayPoint = false;
   SGPath path( globals->get_fg_root() );
   path.append( "/AI/FlightPlans" );
   path.append( p );
+  
   SGPropertyNode root;
   
   // This is a bit of a hack:
@@ -296,6 +302,8 @@ FGAIFlightPlan::~FGAIFlightPlan()
   //    delete *(waypoints.begin());
   //    waypoints.erase (waypoints.begin());
   //  }
+  if (taxiRoute)
+    delete taxiRoute;
 }