From ddda9a6a0d886e66d6cb08dfea1025e0a2deda8c Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 26 May 2015 17:12:05 +0000 Subject: [PATCH] From We See, "I found a small bug in osgUtil::RenderStage::draw() (osg 3.3.7), which crashes osg. The problem was caused by an access to the object _camera without checking whether the object is valid. So I changed the line: Code: if (_cameraRequiresSetUp || (_cameraAttachmentMapModifiedCount!=_camera->getAttachmentMapModifiedCount())) to Code: if (_cameraRequiresSetUp || (_camera.valid() && _cameraAttachmentMapModifiedCount!=_camera->getAttachmentMapModifiedCount())) " git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14873 16af8721-9629-0410-8352-f15c8da7e697 --- src/osgUtil/RenderStage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osgUtil/RenderStage.cpp b/src/osgUtil/RenderStage.cpp index fc88c71b2..f34f93f60 100644 --- a/src/osgUtil/RenderStage.cpp +++ b/src/osgUtil/RenderStage.cpp @@ -1167,7 +1167,7 @@ void RenderStage::draw(osg::RenderInfo& renderInfo,RenderLeaf*& previous) // so there is no need to call it here. drawPreRenderStages(renderInfo,previous); - if (_cameraRequiresSetUp || (_cameraAttachmentMapModifiedCount!=_camera->getAttachmentMapModifiedCount())) + if (_cameraRequiresSetUp || (_camera.valid() && _cameraAttachmentMapModifiedCount!=_camera->getAttachmentMapModifiedCount())) { runCameraSetUp(renderInfo); }