Guard access of nullptr

This commit is contained in:
Magne Sjaastad 2020-08-12 19:40:21 +02:00
parent 40183ce640
commit e61b97f836

View File

@ -409,6 +409,8 @@ void RimRegularLegendConfig::updateLegend()
m_logDiscreteScalarMapper->setRange( adjustedMin, adjustedMax );
m_logSmoothScalarMapper->setRange( adjustedMin, adjustedMax );
if ( m_colorLegend() )
{
cvf::Color3ubArray legendColors = m_colorLegend()->colorArray();
m_linDiscreteScalarMapper->setColors( legendColors );
@ -451,6 +453,7 @@ void RimRegularLegendConfig::updateLegend()
default:
break;
}
}
if ( m_currentScalarMapper != m_categoryMapper.p() )
{