diff --git a/ApplicationCode/ModelVisualization/RivWellFracturePartMgr.cpp b/ApplicationCode/ModelVisualization/RivWellFracturePartMgr.cpp index 6352edf517..218f97cb0c 100644 --- a/ApplicationCode/ModelVisualization/RivWellFracturePartMgr.cpp +++ b/ApplicationCode/ModelVisualization/RivWellFracturePartMgr.cpp @@ -127,14 +127,11 @@ void RivWellFracturePartMgr::updatePartGeometryTexture(caf::DisplayCoordTransfor RimLegendConfig* legendConfig = nullptr; RimEclipseView* activeView = dynamic_cast(RiaApplication::instance()->activeReservoirView()); - RimStimPlanColors* stimPlanColors; - if (activeView) + if (activeView && activeView->stimPlanColors()) { - stimPlanColors = activeView->stimPlanColors; - - if (stimPlanColors->isChecked()) + if (activeView->stimPlanColors()->isChecked()) { - legendConfig = stimPlanColors->activeLegend(); + legendConfig = activeView->stimPlanColors()->activeLegend(); } }