diff --git a/src/osg/Group.cpp b/src/osg/Group.cpp index a67744ff3..f33845057 100644 --- a/src/osg/Group.cpp +++ b/src/osg/Group.cpp @@ -309,12 +309,12 @@ bool Group::setChild( unsigned int i, Node* newNode ) // so need to check and update if required. int delta_numChildrenWithOccluderNodes = 0; if (origNode->getNumChildrenWithOccluderNodes()>0 || - !origNode->getCullingActive()) + dynamic_cast(origNode.get())) { --delta_numChildrenWithOccluderNodes; } if (newNode->getNumChildrenWithOccluderNodes()>0 || - !newNode->getCullingActive()) + dynamic_cast(newNode)) { ++delta_numChildrenWithOccluderNodes; }