Fixed crash in osgoccluder which was calling setUpViewer and the

osgProducer/Viewer was assuming that the update was always set.
This commit is contained in:
Robert Osfield
2003-03-19 10:28:19 +00:00
parent d241ca763b
commit a7bb0126f5
2 changed files with 18 additions and 10 deletions

View File

@@ -231,12 +231,15 @@ void Viewer::update()
}
}
_updateVisitor->setTraversalNumber(_frameStamp->getFrameNumber());
// update the scene by traversing it with the the update visitor which will
// call all node update callbacks and animations.
getSceneData()->accept(*_updateVisitor);
if (_updateVisitor.valid())
{
_updateVisitor->setTraversalNumber(_frameStamp->getFrameNumber());
// update the scene by traversing it with the the update visitor which will
// call all node update callbacks and animations.
getSceneData()->accept(*_updateVisitor);
}
// update the main producer camera
if (_old_style_osg_camera.valid()) setView(_old_style_osg_camera->getModelViewMatrix().ptr());
}