From 33d27a2285b4fde84083e7229809fa878b0ee2fe Mon Sep 17 00:00:00 2001 From: scrawl Date: Sun, 14 Aug 2016 16:41:33 +0200 Subject: [PATCH] Use ref_ptr --- components/nifosg/controller.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/nifosg/controller.cpp b/components/nifosg/controller.cpp index 5a3a7ac59..8d0c73bff 100644 --- a/components/nifosg/controller.cpp +++ b/components/nifosg/controller.cpp @@ -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 texMat (new osg::TexMat); for (std::set::const_iterator it = mTextureUnits.begin(); it != mTextureUnits.end(); ++it) stateset->setTextureAttributeAndModes(*it, texMat, osg::StateAttribute::ON); }