diff --git a/src/Cockpit/wxradar.cxx b/src/Cockpit/wxradar.cxx index a5b11c992..c7cbed471 100644 --- a/src/Cockpit/wxradar.cxx +++ b/src/Cockpit/wxradar.cxx @@ -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] = { diff --git a/src/Cockpit/wxradar.hxx b/src/Cockpit/wxradar.hxx index 7aff77717..8aba4c2cb 100644 --- a/src/Cockpit/wxradar.hxx +++ b/src/Cockpit/wxradar.hxx @@ -44,6 +44,8 @@ public: virtual ~wxRadarBg(); virtual void init(); + virtual void shutdown(); + virtual void update(double dt); virtual void valueChanged(SGPropertyNode *);