]> git.mxchange.org Git - flightgear.git/blobdiff - src/Cockpit/wxradar.cxx
VoiceSynthesizer: add some test/debug properties
[flightgear.git] / src / Cockpit / wxradar.cxx
index 2d3ce04c55b60dfc5af4e9a8510efef98ac1c9cb..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] = {
@@ -1078,13 +1082,9 @@ wxRadarBg::updateFont()
     } else {
         tpath = path;
     }
-
-#if (FG_OSG_VERSION >= 21000)
+    
     osg::ref_ptr<osgDB::ReaderWriter::Options> fontOptions = new osgDB::ReaderWriter::Options("monochrome");
     osg::ref_ptr<osgText::Font> font = osgText::readFontFile(tpath.c_str(), fontOptions.get());
-#else
-    osg::ref_ptr<osgText::Font> font = osgText::readFontFile(tpath.c_str());
-#endif
 
     if (font != 0) {
         _font = font;