From ef6f2dbcfd940cc0dac81d079a513bdd2af97dba Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 25 Sep 2015 11:15:04 +0000 Subject: [PATCH] Added fix for case when Renderer is assigned to a Camera that has now View git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15141 16af8721-9629-0410-8352-f15c8da7e697 --- src/osgViewer/Renderer.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/osgViewer/Renderer.cpp b/src/osgViewer/Renderer.cpp index 6c4afb3c1..25fc8e608 100644 --- a/src/osgViewer/Renderer.cpp +++ b/src/osgViewer/Renderer.cpp @@ -533,10 +533,14 @@ void Renderer::updateSceneView(osgUtil::SceneView* sceneView) sceneView->getCullVisitor()->setImageRequestHandler(imagePager); - if (view->getFrameStamp()) + if (view && view->getFrameStamp()) { (*sceneView->getFrameStamp()) = *(view->getFrameStamp()); } + else if (state->getFrameStamp()) + { + (*sceneView->getFrameStamp()) = *(state->getFrameStamp()); + } osg::DisplaySettings* ds = _camera->getDisplaySettings() ? _camera->getDisplaySettings() : ((view &&view->getDisplaySettings()) ? view->getDisplaySettings() : osg::DisplaySettings::instance().get());