From 693302574dba7b147f68a894f17946cecb63aa6a Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 5 Dec 2006 16:45:27 +0000 Subject: [PATCH] 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. --- src/osg/ProxyNode.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osg/ProxyNode.cpp b/src/osg/ProxyNode.cpp index 1ed1f264e..3eeccbae5 100644 --- a/src/osg/ProxyNode.cpp +++ b/src/osg/ProxyNode.cpp @@ -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) {