From d2ae4d692d165cc53df6b96f341b6287447f1c6d Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Sun, 11 Sep 2005 19:12:54 +0000 Subject: [PATCH] From Henrique Bucher, add check against null light entry in LightPool. --- src/osgPlugins/flt/flt2osg.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/osgPlugins/flt/flt2osg.cpp b/src/osgPlugins/flt/flt2osg.cpp index c42fbd796..9836edcc8 100644 --- a/src/osgPlugins/flt/flt2osg.cpp +++ b/src/osgPlugins/flt/flt2osg.cpp @@ -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(