1
0
Fork 0

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
This commit is contained in:
James Turner 2013-12-09 21:46:34 +00:00
parent 01b824929c
commit 7719ad920d
2 changed files with 1 additions and 1 deletions

View file

@ -80,7 +80,6 @@ void FGXMLAutopilotGroupImplementation::removeAutopilot( const std::string & nam
FGXMLAutopilot::Autopilot * ap = (FGXMLAutopilot::Autopilot*)get_subsystem( name ); FGXMLAutopilot::Autopilot * ap = (FGXMLAutopilot::Autopilot*)get_subsystem( name );
if( ap == NULL ) return; // ? if( ap == NULL ) return; // ?
remove_subsystem( name ); remove_subsystem( name );
delete ap;
} }

View file

@ -32,6 +32,7 @@ class FGXMLAutopilotGroup : public SGSubsystemGroup
{ {
public: public:
static FGXMLAutopilotGroup * createInstance(const std::string& nodeName); static FGXMLAutopilotGroup * createInstance(const std::string& nodeName);
void addAutopilotFromFile( const std::string & name, SGPropertyNode_ptr apNode, const char * path ); 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 addAutopilot( const std::string & name, SGPropertyNode_ptr apNode, SGPropertyNode_ptr config ) = 0;
virtual void removeAutopilot( const std::string & name ) = 0; virtual void removeAutopilot( const std::string & name ) = 0;