Reference counting is biting your, normally your friend that you will grow to appreciate the power of over time, but right now its biting you because you holding a C* to an ref counting object that is being automatically deleted.
You should use ref_ptr<> to make sure the ref counts are managed correctly:
osg::ref_ptr<osg::Group> root = new osg::Group;
osg::ref_ptr<osg::Group> root2 = new osg::Group;
viewer.setSceneData( root.get() );
viewer.setSceneData( root1.get() );
viewer.setSceneData( root.get() );//the pogram does now safely pass this line ;-)
_______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
