From: James Turner Date: Mon, 9 Dec 2013 21:46:34 +0000 (+0000) Subject: Bug 1289, crash on AP reload X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=7719ad920d22aa24a1bbeaeef710433370c7cd66;p=flightgear.git Bug 1289, crash on AP reload - missed update for revised subsystem ownership in the AP code. https://code.google.com/p/flightgear-bugs/issues/detail?id=1289 --- 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;