diff --git a/src/osgPlugins/3ds/ReaderWriter3DS.cpp b/src/osgPlugins/3ds/ReaderWriter3DS.cpp index 0c25c3e69..1615bf5af 100644 --- a/src/osgPlugins/3ds/ReaderWriter3DS.cpp +++ b/src/osgPlugins/3ds/ReaderWriter3DS.cpp @@ -1378,7 +1378,7 @@ ReaderWriter3DS::StateSetInfo ReaderWriter3DS::ReaderObject::createStateSet(Lib3 osg::ref_ptr reflection_map = createTexture(&(mat->reflection_map),"reflection_map",textureTransparency); if (reflection_map) { - stateset->setTextureAttributeAndModes(unit, reflection_map, osg::StateAttribute::ON); + stateset->setTextureAttributeAndModes(unit, reflection_map.get(), osg::StateAttribute::ON); // setup spherical map... osg::ref_ptr texgen = new osg::TexGen();