From 0732701e9d3fd0666bee861bb02cb95a52c3e7f1 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 3 Jun 2002 18:38:40 +0000 Subject: [PATCH] Fix to CullVisitor::popCullingSet(). --- src/osgUtil/CullVisitor.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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())); }