Changeset 10135

Show
Ignore:
Timestamp:
05/05/09 13:05:17 (9 months ago)
Author:
robert
Message:

Added checks to prevent crash when no imagery is applied

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osgVolume/FixedFunctionTechnique.cpp

    r9511 r10135  
    9999void FixedFunctionTechnique::init() 
    100100{ 
    101     osg::notify(osg::NOTICE)<<"FixedFunctionTechnique::init()"<<std::endl; 
    102  
    103     if (!_volumeTile) return; 
     101    osg::notify(osg::INFO)<<"FixedFunctionTechnique::init()"<<std::endl; 
     102 
     103    if (!_volumeTile) 
     104    { 
     105        osg::notify(osg::NOTICE)<<"FixedFunctionTechnique::init(), error no volume tile assigned."<<std::endl; 
     106        return; 
     107    } 
     108 
     109    if (_volumeTile->getLayer()==0) 
     110    { 
     111        osg::notify(osg::NOTICE)<<"FixedFunctionTechnique::init(), error no layer assigend to volume tile."<<std::endl; 
     112        return; 
     113    } 
     114 
     115    if (_volumeTile->getLayer()->getImage()==0) 
     116    { 
     117        osg::notify(osg::NOTICE)<<"FixedFunctionTechnique::init(), error no image assigned to layer."<<std::endl; 
     118        return; 
     119    } 
    104120 
    105121    float alphaFuncValue = 0.1;