From bf6ef6664cde071cb239d00ebedf6f82dab494ee Mon Sep 17 00:00:00 2001 From: James Turner Date: Tue, 3 Nov 2015 15:28:46 -0600 Subject: [PATCH] Fix for OSG 3.5 --- src/Main/bootstrap.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Main/bootstrap.cxx b/src/Main/bootstrap.cxx index a59fdb47e..f15c9098a 100644 --- a/src/Main/bootstrap.cxx +++ b/src/Main/bootstrap.cxx @@ -219,13 +219,15 @@ int main ( int argc, char **argv ) // ensure sglog is inited before atexit() is registered, so logging // is possible inside fgExitCleanup sglog(); - + + +#if (OPENSCENEGRAPH_MAJOR_VERSION == 3) && (OPENSCENEGRAPH_MINOR_VERSION < 5) // similar to above, ensure some static maps inside OSG exist before // we register our at-exit handler, otherwise the statics are gone // when fg_terminate runs, which causes crashes. osg::Texture::getTextureObjectManager(0); osg::GLBufferObjectManager::getGLBufferObjectManager(0); - +#endif std::set_terminate(fg_terminate); atexit(fgExitCleanup); if (fgviewer) -- 2.39.5