diff --git a/ApplicationCode/ProjectDataModel/Completions/RimFractureModel.cpp b/ApplicationCode/ProjectDataModel/Completions/RimFractureModel.cpp index bd3e72afe4..403299b2ce 100644 --- a/ApplicationCode/ProjectDataModel/Completions/RimFractureModel.cpp +++ b/ApplicationCode/ProjectDataModel/Completions/RimFractureModel.cpp @@ -220,10 +220,12 @@ QList RimFractureModel::calculateValueOptions( const caf else if ( fieldNeedingOptions == &m_overburdenFacies || fieldNeedingOptions == &m_underburdenFacies ) { RimColorLegend* faciesColors = RimProject::current()->colorLegendCollection()->findByName( "Facies colors" ); - - for ( RimColorLegendItem* item : faciesColors->colorLegendItems() ) + if ( faciesColors ) { - options.push_back( caf::PdmOptionItemInfo( item->categoryName(), item->categoryName() ) ); + for ( RimColorLegendItem* item : faciesColors->colorLegendItems() ) + { + options.push_back( caf::PdmOptionItemInfo( item->categoryName(), item->categoryName() ) ); + } } }