]> git.mxchange.org Git - flightgear.git/commitdiff
Reset: ensure FGODGuage shutsdown cleanly.
authorJames Turner <zakalawe@mac.com>
Fri, 6 Dec 2013 18:45:45 +0000 (18:45 +0000)
committerJames Turner <zakalawe@mac.com>
Fri, 6 Dec 2013 18:45:45 +0000 (18:45 +0000)
- remove ODGuage instances during shutdown phase (don't wait until
deletion)

src/Cockpit/wxradar.cxx
src/Cockpit/wxradar.hxx

index a5b11c9922549f029b365d185dda1fac9c28e592..c7cbed47141b9a2ed15b460965ad9b26f4abbf58 100644 (file)
@@ -118,7 +118,6 @@ wxRadarBg::wxRadarBg(SGPropertyNode *node) :
 wxRadarBg::~wxRadarBg ()
 {
     _font_node->removeChangeListener(this);
-    delete _odg;
 }
 
 
@@ -249,6 +248,11 @@ wxRadarBg::init ()
     _time = 0.0;
 }
 
+void wxRadarBg::shutdown()
+{
+    delete _odg;
+    _odg = NULL;
+}
 
 // Local coordinates for each echo
 const osg::Vec3f echoCoords[4] = {
index 7aff7771718b2be81c13b5b560f3de7d2b8a3223..8aba4c2cb6e781c4825b99a66ac2aa32a66a022f 100644 (file)
@@ -44,6 +44,8 @@ public:
     virtual ~wxRadarBg();
 
     virtual void init();
+    virtual void shutdown();
+    
     virtual void update(double dt);
     virtual void valueChanged(SGPropertyNode *);