diff --git a/src/osgFX/BumpMapping.cpp b/src/osgFX/BumpMapping.cpp index 50f700eae..166e1a5f5 100644 --- a/src/osgFX/BumpMapping.cpp +++ b/src/osgFX/BumpMapping.cpp @@ -41,7 +41,7 @@ namespace NodeVisitor::apply(geode); } private: - osg::ref_ptr bm_; + BumpMapping *bm_; }; @@ -600,8 +600,8 @@ void BumpMapping::prepareGeometry(osg::Geometry *geo) void BumpMapping::prepareNode(osg::Node *node) { - TsgVisitor tv(this); - node->accept(tv); + osg::ref_ptr tv = new TsgVisitor(this); + node->accept(*tv.get()); } void BumpMapping::prepareChildren()