Remove null pointers from vector of color legend objects

This commit is contained in:
Magne Sjaastad 2020-09-29 12:51:28 +02:00
parent ec40673119
commit 25ee7a1610
2 changed files with 5 additions and 0 deletions

View File

@ -2215,6 +2215,8 @@ std::vector<RimLegendConfig*> RimEclipseView::legendConfigs() const
}
}
absLegends.erase( std::remove( absLegends.begin(), absLegends.end(), nullptr ), absLegends.end() );
return absLegends;
}

View File

@ -649,6 +649,9 @@ std::vector<RimLegendConfig*> RimGeoMechView::legendConfigs() const
}
}
absLegendConfigs.erase( std::remove( absLegendConfigs.begin(), absLegendConfigs.end(), nullptr ),
absLegendConfigs.end() );
return absLegendConfigs;
}