diff --git a/src/osgUtil/CullVisitor.cpp b/src/osgUtil/CullVisitor.cpp index 4fc89b999..31ba31b3a 100644 --- a/src/osgUtil/CullVisitor.cpp +++ b/src/osgUtil/CullVisitor.cpp @@ -179,7 +179,8 @@ void CullVisitor::pushCullingSet() _windowToModelFactorDirty = true; - _modelviewCullingStack.push_back(osgNew osg::CullingSet(*_projectionCullingStack.back(),*_modelviewStack.back())); + if (_modelviewStack.empty()) _modelviewCullingStack.push_back(_projectionCullingStack.back()); + else _modelviewCullingStack.push_back(osgNew osg::CullingSet(*_projectionCullingStack.back(),*_modelviewStack.back())); }