#14112 Contour map: guard remaining legend config dereferences

Guard the remaining unguarded legendConfig() uses so a null legend config
cannot crash: both updateLegend() implementations (eclipse and statistics
projections) now capture the pointer and return early when null, and the
statistics view tree ordering skips a null legend config.
This commit is contained in:
Magne Sjaastad committed 2026-06-04 16:06:50 +02:00
1 parent ea719c41b3
commit 85f5848bde
3 files changed
+16 -7

No files matched your search

@@ -155,7 +155,10 @@ void RimStatisticsContourMapView::defineUiTreeOrdering( caf::PdmUiTreeOrdering&
{
uiTreeOrdering.add( m_overlayInfoConfig() );
uiTreeOrdering.add( m_contourMapProjection );
uiTreeOrdering.add( cellResult()->legendConfig() );
if ( cellResult() && cellResult()->legendConfig() )
{
uiTreeOrdering.add( cellResult()->legendConfig() );
}
uiTreeOrdering.add( wellCollection() );
uiTreeOrdering.add( faultCollection() );
uiTreeOrdering.add( annotationCollection() );