Use ref_ptr

coverity_scan^2
scrawl 8 years ago
parent 0fbc0d0da7
commit 33d27a2285

@ -239,7 +239,7 @@ UVController::UVController(const UVController& copy, const osg::CopyOp& copyop)
void UVController::setDefaults(osg::StateSet *stateset)
{
osg::TexMat* texMat = new osg::TexMat;
osg::ref_ptr<osg::TexMat> texMat (new osg::TexMat);
for (std::set<int>::const_iterator it = mTextureUnits.begin(); it != mTextureUnits.end(); ++it)
stateset->setTextureAttributeAndModes(*it, texMat, osg::StateAttribute::ON);
}

Loading…
Cancel
Save