mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#6038 Avoid crashing when facies colors does not exist.
This commit is contained in:
parent
9f0a6c6223
commit
3425031e27
@ -220,10 +220,12 @@ QList<caf::PdmOptionItemInfo> 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() ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user