From Henrique Bucher, add check against null light entry in LightPool.

This commit is contained in:
Robert Osfield
2005-09-11 19:12:54 +00:00
parent 141f8a70d7
commit d2ae4d692d

View File

@@ -995,6 +995,8 @@ osg::Group* ConvertFromFLT::visitLightSource(osg::Group& osgParent, LightSourceR
osg::LightSource* lightSource = new osg::LightSource();
osg::Light* pLight = pLightPool->getLight( pLSource->diIndex );
if ( pLight==NULL ) return NULL;
osg::Light* light = new osg::Light( *pLight );
light->setPosition( osg::Vec4(