diff --git a/components/nifosg/nifloader.cpp b/components/nifosg/nifloader.cpp index 6a2523120..2ed91d467 100644 --- a/components/nifosg/nifloader.cpp +++ b/components/nifosg/nifloader.cpp @@ -414,7 +414,7 @@ namespace NifOsg if (nifNode == NULL) nif->fail("First root was not a node, but a " + r->recName); - osg::Node* created = handleNode(nifNode, false, std::map(), 0, 0, false, textKeys); + osg::ref_ptr created = handleNode(nifNode, false, std::map(), 0, 0, false, textKeys); return created; }