diff --git a/src/Autopilot/autopilotgroup.cxx b/src/Autopilot/autopilotgroup.cxx index c60ea3010..836f7c4cb 100644 --- a/src/Autopilot/autopilotgroup.cxx +++ b/src/Autopilot/autopilotgroup.cxx @@ -80,7 +80,6 @@ void FGXMLAutopilotGroupImplementation::removeAutopilot( const std::string & nam FGXMLAutopilot::Autopilot * ap = (FGXMLAutopilot::Autopilot*)get_subsystem( name ); if( ap == NULL ) return; // ? remove_subsystem( name ); - delete ap; } diff --git a/src/Autopilot/autopilotgroup.hxx b/src/Autopilot/autopilotgroup.hxx index 5390f8c43..ef97927c1 100644 --- a/src/Autopilot/autopilotgroup.hxx +++ b/src/Autopilot/autopilotgroup.hxx @@ -32,6 +32,7 @@ class FGXMLAutopilotGroup : public SGSubsystemGroup { public: static FGXMLAutopilotGroup * createInstance(const std::string& nodeName); + void addAutopilotFromFile( const std::string & name, SGPropertyNode_ptr apNode, const char * path ); virtual void addAutopilot( const std::string & name, SGPropertyNode_ptr apNode, SGPropertyNode_ptr config ) = 0; virtual void removeAutopilot( const std::string & name ) = 0;