Added fix for case when Renderer is assigned to a Camera that has now View

git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.4@15142 16af8721-9629-0410-8352-f15c8da7e697
This commit is contained in:
Robert Osfield 2015-09-25 11:15:09 +00:00
parent 1a9a74216b
commit 05f3e038d8

View File

@ -533,10 +533,14 @@ void Renderer::updateSceneView(osgUtil::SceneView* sceneView)
sceneView->getCullVisitor()->setImageRequestHandler(imagePager);
if (view->getFrameStamp())
if (view && view->getFrameStamp())
{
(*const_cast<osg::FrameStamp*>(sceneView->getFrameStamp())) = *(view->getFrameStamp());
}
else if (state->getFrameStamp())
{
(*const_cast<osg::FrameStamp*>(sceneView->getFrameStamp())) = *(state->getFrameStamp());
}
osg::DisplaySettings* ds = _camera->getDisplaySettings() ? _camera->getDisplaySettings() :
((view &&view->getDisplaySettings()) ? view->getDisplaySettings() : osg::DisplaySettings::instance().get());