Add more nullptr guards

This commit is contained in:
Jon Jenssen authored and JJ committed 2025-11-06 07:05:51 +01:00
1 parent 3b24586c61
commit fdc8608a29
1 file changed
+3 -2
@@ -177,14 +177,15 @@ void RimContourMapProjection::generateGeometryIfNecessary()
{
caf::ProgressInfo progress( 100, "Generate Geometry", true );
if ( geometryNeedsUpdating() )
if ( geometryNeedsUpdating() && m_contourMapProjection != nullptr )
{
m_contourMapProjection->setValueFilter( valueFilterMinMax() );
std::vector<double> contourLevels;
bool discrete = false;
if ( legendConfig()->mappingMode() != RimRegularLegendConfig::MappingType::CATEGORY_INTEGER )
if ( ( legendConfig() != nullptr ) && ( legendConfig()->scalarMapper() != nullptr ) &&
( legendConfig()->mappingMode() != RimRegularLegendConfig::MappingType::CATEGORY_INTEGER ) )
{
legendConfig()->scalarMapper()->majorTickValues( &contourLevels );