mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Guard access of nullptr
This commit is contained in:
parent
40183ce640
commit
e61b97f836
@ -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() )
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user