Added check against null colour layer to prevent a crash when a null colour layer is assigned
This commit is contained in:
@@ -725,7 +725,7 @@ void GeometryTechnique::applyColorLayers()
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
colorLayer = switchLayer->getLayer(switchLayer->getActiveLayer());
|
||||
if (!colorLayer) continue;
|
||||
}
|
||||
@@ -795,7 +795,7 @@ void GeometryTechnique::applyTransparency()
|
||||
bool containsTransparency = false;
|
||||
for(unsigned int i=0; i<_terrainTile->getNumColorLayers(); ++i)
|
||||
{
|
||||
osg::Image* image = _terrainTile->getColorLayer(i)->getImage();
|
||||
osg::Image* image = (_terrainTile->getColorLayer(i)!=0) ? _terrainTile->getColorLayer(i)->getImage() : 0;
|
||||
if (image)
|
||||
{
|
||||
containsTransparency = image->isImageTranslucent();
|
||||
|
||||
Reference in New Issue
Block a user