diff --git a/src/osgUtil/CullVisitor.cpp b/src/osgUtil/CullVisitor.cpp index 807fee7ca..c1d78b0b6 100644 --- a/src/osgUtil/CullVisitor.cpp +++ b/src/osgUtil/CullVisitor.cpp @@ -815,8 +815,16 @@ void CullVisitor::apply(Geode& node) } } - if (bb.valid()) addDrawableAndDepth(drawable,&matrix,distance(bb.center(),matrix)); - else addDrawableAndDepth(drawable,&matrix,0.0f); + float depth = bb.valid() ? distance(bb.center(),matrix) : 0.0f; + + if (osg::isNaN(depth)) + { + osg::notify(osg::NOTICE)<<"CullVisitor::apply(Geode& node) detected NaN,"<