From Rein Kadijk, "While displaying a certain scene, OsgEdit crashed in ProxyNode::traverse() in file OSG_OP_OT-1.2\OpenSceneGraph\src\osg\proxynode.cpp.

It turned out that nv.getDatabaseRequestHandler() returned NULL; using this pointer to call one of DatabaseRequestHandler's methods is of course illegal.
I patched it by adding: if (nv.getDatabaseRequestHandler())"

From Robert Osfield, reordered the addition of the nv.getDatabaseRequestHandler() check to allow the
default traverse() to be called when no database handling is attached to the visitor.
This commit is contained in:
Robert Osfield
2006-12-05 16:45:27 +00:00
parent 875668b84d
commit 693302574d

View File

@@ -54,7 +54,7 @@ void ProxyNode::setDatabasePath(const std::string& path)
void ProxyNode::traverse(NodeVisitor& nv)
{
if (_filenameList.size()>_children.size() && nv.getVisitorType()==NodeVisitor::CULL_VISITOR)
if (nv.getDatabaseRequestHandler() && _filenameList.size()>_children.size() && nv.getVisitorType()==NodeVisitor::CULL_VISITOR)
{
for(unsigned int i=_children.size(); i<_filenameList.size(); ++i)
{