From 2c60114a94403ff9b21581ab8c999305806c88be Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 9 Sep 2004 08:18:43 +0000 Subject: [PATCH] From Martin Aumueller, added ref() and unref() to Inventor node handling. --- src/osgPlugins/Inventor/ReaderWriterIV.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/osgPlugins/Inventor/ReaderWriterIV.cpp b/src/osgPlugins/Inventor/ReaderWriterIV.cpp index f80520702..0a19756af 100644 --- a/src/osgPlugins/Inventor/ReaderWriterIV.cpp +++ b/src/osgPlugins/Inventor/ReaderWriterIV.cpp @@ -56,9 +56,12 @@ ReaderWriterIV::readNode(const std::string& file, if (rootIVNode) { + rootIVNode->ref(); // Convert the inventor scenegraph to an osg scenegraph and return it ConvertFromInventor convertIV; - return convertIV.convert(rootIVNode); + ReadResult result = convertIV.convert(rootIVNode); + rootIVNode->unref(); + return result; } return ReadResult::FILE_NOT_HANDLED;