diff --git a/src/Viewer/renderer.cxx b/src/Viewer/renderer.cxx index 0176b3768..b7d930483 100644 --- a/src/Viewer/renderer.cxx +++ b/src/Viewer/renderer.cxx @@ -74,6 +74,7 @@ #include #include #include +#include #include #include #include @@ -1503,7 +1504,9 @@ FGRenderer::setupView( void ) stateSet = mRealRoot->getOrCreateStateSet(); stateSet->setAttributeAndModes(new osg::Program, osg::StateAttribute::ON); - mDeferredRealRoot->addChild( mRealRoot.get() ); + mDeferredRealRoot->addChild( mRealRoot.get() ); + + DeletionManager::install(mRealRoot.get()); } // Update all Visuals (redraws anything graphics related)