diff --git a/components/sceneutil/statesetupdater.cpp b/components/sceneutil/statesetupdater.cpp index 08418f3312..9fb9ba496c 100644 --- a/components/sceneutil/statesetupdater.cpp +++ b/components/sceneutil/statesetupdater.cpp @@ -22,7 +22,7 @@ namespace SceneUtil } } - osg::StateSet* stateset = mStateSets[nv->getTraversalNumber()%2]; + osg::ref_ptr stateset = mStateSets[nv->getTraversalNumber()%2]; apply(stateset, nv); if (!isCullVisitor)