1
0
Fork 0

Modified Files:

src/Main/util.cxx: Olaf Flebbe: flush the osgDB cache just before
	exit. This avoids a static destructor cleanup problem with static
	osg linkage.
This commit is contained in:
frohlich 2007-01-31 20:43:10 +00:00
parent dc9750f16e
commit a8a85fa80c

View file

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