]> git.mxchange.org Git - flightgear.git/commitdiff
Bug 1289, crash on AP reload
authorJames Turner <zakalawe@mac.com>
Mon, 9 Dec 2013 21:46:34 +0000 (21:46 +0000)
committerJames Turner <zakalawe@mac.com>
Mon, 9 Dec 2013 21:46:34 +0000 (21:46 +0000)
- missed update for revised subsystem ownership in the AP code.

https://code.google.com/p/flightgear-bugs/issues/detail?id=1289

src/Autopilot/autopilotgroup.cxx
src/Autopilot/autopilotgroup.hxx

index c60ea3010a6d2f8c27dc6ee0f22d51f74bfcedcc..836f7c4cb67473ca5762a17f6254f78d16572c34 100644 (file)
@@ -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;
 }
 
 
index 5390f8c43186c2880e7630d613f16790a18b760e..ef97927c1fdfc58dd873626b6f64750a008a2011 100644 (file)
@@ -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;