mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-26 23:20:29 -05:00
#14112 Contour map: guard null legend config in defineUiOrdering
Selecting a contour map projection in the tree could crash when the associated legend config was null. RimContourMapProjection::defineUiOrdering called legendConfig()->uiOrdering() unguarded. Because PdmUiObjectHandle::uiOrdering is non-virtual, the call entered with a null this and then crashed on the virtual defineUiOrdering dispatch. Guard the legendConfig() dereference, matching the existing null checks elsewhere in the file. Apply the same guard to RimEclipseCellColors::defineUiOrdering.
This commit is contained in:
1 parent
0275191b36
commit
ea719c41b3
2 files changed
+5
-2
No files matched your search
@@ -223,7 +223,7 @@ void RimEclipseCellColors::defineUiOrdering( QString uiConfigName, caf::PdmUiOrd
|
||||
{
|
||||
RimEclipseResultDefinition::defineUiOrdering( uiConfigName, uiOrdering );
|
||||
|
||||
if ( uiConfigName == "AddLegendLevels" )
|
||||
if ( uiConfigName == "AddLegendLevels" && legendConfig() )
|
||||
{
|
||||
legendConfig()->uiOrdering( "NumIntervalsOnly", uiOrdering );
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user