From Mathias Froehlich, "the attached patch adds an additional null pointer check"

This commit is contained in:
Robert Osfield 2011-06-09 11:07:27 +00:00
parent 2ddd53730e
commit 1016092720

View File

@ -329,6 +329,7 @@ osg::Node* ReaderWriterVRML2::convertFromVRML(openvrml::node *obj) const
const openvrml::sfnode * sfn = dynamic_cast<const openvrml::sfnode *>(fv.get());
openvrml::sfnode::value_type node_ptr = sfn->value();
if (node_ptr.get()) {
// is it indexed_face_set_node ?
if (node_ptr->type().id()=="IndexedFaceSet")
osg_geom = convertVRML97IndexedFaceSet(node_ptr.get());
@ -354,6 +355,7 @@ osg::Node* ReaderWriterVRML2::convertFromVRML(openvrml::node *obj) const
}
}
}
}
osg::ref_ptr<osg::Geode> osg_geode = new osg::Geode();
osg_geode->addDrawable(osg_geom.get());