Fix for crash in SceneView introduced when ungarded use of _dispalySettings

pointer was added, a if (valid) guard has been added to solve the problem.
This commit is contained in:
Robert Osfield 2002-04-14 12:53:36 +00:00
parent 8a5c6d5102
commit e71b92dbcc

View File

@ -166,7 +166,9 @@ void SceneView::cull()
if (_camera.valid())
{
_camera->adjustAspectRatio(_viewport->aspectRatio());
_camera->setScreenDistance(_displaySettings->getScreenDistance());
if (_displaySettings.valid())
_camera->setScreenDistance(_displaySettings->getScreenDistance());
if (!projection) projection = osgNew osg::Matrix(_camera->getProjectionMatrix());
if (!modelview) modelview = osgNew osg::Matrix(_camera->getModelViewMatrix());