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
This commit is contained in:
Robert Osfield 2015-05-26 17:12:05 +00:00
parent 01e87939a4
commit ddda9a6a0d

View File

@ -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);
}