]> git.mxchange.org Git - flightgear.git/blobdiff - src/Viewer/fg_os_osgviewer.cxx
VoiceSynthesizer: add some test/debug properties
[flightgear.git] / src / Viewer / fg_os_osgviewer.cxx
index 72481bc89411304d845fc9f548dab74f46166a95..7ba9932180ae44d6d6a0f73b639110d319d4c3c9 100644 (file)
@@ -315,6 +315,11 @@ void fgOSExit(int code)
     viewer->setDone(true);
     viewer->getDatabasePager()->cancel();
     status = code;
+    
+    // otherwise we crash if OSG does logging during static destruction, eg
+    // GraphicsWindowX11, since OSG statics may have been created before the
+    // sglog static, despite our best efforts in boostrap.cxx
+    osg::setNotifyHandler(new osg::StandardNotifyHandler);
 }
 
 int fgOSMainLoop()