Hi Peterakos, You should always check that the node set by the dynamic_cast<> is not NULL before doing any operation on it, this is a very basic programming practice, you shouldn't assume that the root node will always be a Group or a subclass from Group.
Robert. On 20 August 2012 18:15, Peterakos <hay...@gmail.com> wrote: > Hello. > Thank you for your answer. > Using an InfoVisitorNode, i can see there is not any group node as a parent. > Even though that happens, i can still use addChild method in something that > is not Group and has been passed through dynamic_cast. > > osg::ref_ptr<osg::Group> node = > dynamic_cast<osg::Group*>(osgDB::readNodeFile("astroboy_walk.dae")); > node->addChild(createAxis()); > > > I send the dae file too. > > thank you for your time. > > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org