Index: OpenSceneGraph/trunk/src/osgPlugins/Inventor/ConvertFromInventor.cpp
===================================================================
--- OpenSceneGraph/trunk/src/osgPlugins/Inventor/ConvertFromInventor.cpp (revision 11032)
+++ OpenSceneGraph/trunk/src/osgPlugins/Inventor/ConvertFromInventor.cpp (revision 11034)
@@ -281,5 +281,5 @@
     // (ivStateStack is used to track the state that is not accessible by
     // SoCallbackAction functions)
-    ivStateStack.push(IvStateItem(ivRootNode, osgRootNode));
+    ivStateStack.push(IvStateItem(ivRootNode, osgRootNode.get()));
 
     // Create callback actions for the inventor nodes
@@ -512,16 +512,5 @@
 
         // Get osgStateRoot (note: we HAVE TO reference it)
-        osg::Group *stateRoot = ivState.osgStateRoot;
-        osg::ref_ptr<osg::Group> r = stateRoot;
-/*    assert(strcmp(stateRoot->className(), "Group") == 0 &&
-           "IvStateStack osg graph is expected to be "
-           "headed by osg::Group");
-        if (stateRoot->getNumChildren() == 1) {
-            r = stateRoot->getChild(0)->asGroup();
-            osg::notify(osg::FATAL) << stateRoot->className() << std::endl;
-            osg::notify(osg::FATAL) << stateRoot->getChild(0)->className() << std::endl;
-            exit(0);
-            assert(r != NULL && "Node must be group.");
-        }*/
+        osg::ref_ptr<osg::Group> r = ivState.osgStateRoot;
 
         // Pop state
@@ -539,5 +528,5 @@
         // APPEND_AT_PUSH
         if (!(ivState.flags & IvStateItem::APPEND_AT_PUSH))
-            appendNode(r, action);
+            appendNode(r.get(), action);
 
     } while (multipop);
@@ -1229,5 +1218,5 @@
     }
 
-    return osgProgram->addShader(osgShader);
+    return osgProgram->addShader(osgShader.get());
 }
 #endif // INVENTOR_SHADERS_AVAILABLE
