]> git.mxchange.org Git - flightgear.git/commitdiff
Modified Files:
authorfrohlich <frohlich>
Wed, 31 Jan 2007 20:43:10 +0000 (20:43 +0000)
committerfrohlich <frohlich>
Wed, 31 Jan 2007 20:43:10 +0000 (20:43 +0000)
src/Main/util.cxx: Olaf Flebbe: flush the osgDB cache just before
exit. This avoids a static destructor cleanup problem with static
osg linkage.

src/Main/util.cxx

index 3daeb991b712c4696cb481b59bc14dc958a73339..3eb68faa06f2883cdc22c61d6b6226c6b7fe7e0d 100644 (file)
@@ -32,6 +32,9 @@ SG_USING_STD(vector);
 #include "globals.hxx"
 #include "util.hxx"
 
+#ifdef OSG_LIBRARY_STATIC
+#include "osgDB/Registry"
+#endif
 
 void
 fgDefaultWeatherValue (const char * propname, double value)
@@ -109,6 +112,9 @@ fgExit (int status)
     SGSubsystem *sub = globals->get_subsystem("ai_model");
     globals->get_subsystem_mgr()->get_group(SGSubsystemMgr::GENERAL)->remove_subsystem("ai_model");
     delete sub;
+#ifdef OSG_LIBRARY_STATIC
+    osgDB::Registry::instance( true);
+#endif
 
     SG_LOG(SG_GENERAL, SG_INFO, "Exiting FlightGear with status " << status);
     exit(status);