diff --git a/src/osgPlugins/txp/TXPNode.cpp b/src/osgPlugins/txp/TXPNode.cpp index a80e70b9e..acadf54a1 100644 --- a/src/osgPlugins/txp/TXPNode.cpp +++ b/src/osgPlugins/txp/TXPNode.cpp @@ -90,6 +90,8 @@ void TXPNode::traverse(osg::NodeVisitor& nv) { case osg::NodeVisitor::CULL_VISITOR: { + + OpenThreads::ScopedLock lock(_mutex); osgUtil::CullVisitor* cv = dynamic_cast(&nv); if (cv) @@ -132,8 +134,12 @@ void TXPNode::traverse(osg::NodeVisitor& nv) break; } case osg::NodeVisitor::UPDATE_VISITOR: + { + OpenThreads::ScopedLock lock(_mutex); + updateSceneGraph(); break; + } default: break; } diff --git a/src/osgPlugins/txp/TXPNode.h b/src/osgPlugins/txp/TXPNode.h index ba73a65f8..ad82f6bcc 100644 --- a/src/osgPlugins/txp/TXPNode.h +++ b/src/osgPlugins/txp/TXPNode.h @@ -93,6 +93,8 @@ protected: std::string _archiveName; std::string _options; + OpenThreads::Mutex _mutex; + osg::ref_ptr _archive; osg::ref_ptr _pageManager;