diff --git a/src/osg/Drawable.cpp b/src/osg/Drawable.cpp index 8bb2b40e8..18d64730f 100644 --- a/src/osg/Drawable.cpp +++ b/src/osg/Drawable.cpp @@ -223,7 +223,6 @@ Drawable::Drawable() Drawable::Drawable(const Drawable& drawable,const CopyOp& copyop): Object(drawable,copyop), _parents(), // leave empty as parentList is managed by Geode - _stateset(copyop(drawable._stateset.get())), _initialBound(drawable._initialBound), _computeBoundCallback(drawable._computeBoundCallback), _boundingBox(drawable._boundingBox), @@ -240,6 +239,7 @@ Drawable::Drawable(const Drawable& drawable,const CopyOp& copyop): _cullCallback(drawable._cullCallback), _drawCallback(drawable._drawCallback) { + setStateSet(copyop(drawable._stateset.get())); } Drawable::~Drawable() diff --git a/src/osg/Node.cpp b/src/osg/Node.cpp index 098a49f65..45b5555dc 100644 --- a/src/osg/Node.cpp +++ b/src/osg/Node.cpp @@ -82,9 +82,9 @@ Node::Node(const Node& node,const CopyOp& copyop): _numChildrenWithCullingDisabled(0), // assume no children yet. _numChildrenWithOccluderNodes(0), _nodeMask(node._nodeMask), - _descriptions(node._descriptions), - _stateset(copyop(node._stateset.get())) + _descriptions(node._descriptions) { + setStateSet(copyop(node._stateset.get())); } Node::~Node()