diff --git a/apps/openmw/mwrender/util.cpp b/apps/openmw/mwrender/util.cpp index 876ec285f..cb1953c61 100644 --- a/apps/openmw/mwrender/util.cpp +++ b/apps/openmw/mwrender/util.cpp @@ -22,7 +22,7 @@ void overrideTexture(const std::string &texture, Resource::ResourceSystem *resou osg::ref_ptr stateset; if (node->getStateSet()) - stateset = static_cast(node->getStateSet()->clone(osg::CopyOp::SHALLOW_COPY)); + stateset = osg::clone(node->getStateSet(), osg::CopyOp::SHALLOW_COPY); else stateset = new osg::StateSet;