#3367 Cell Edge : Crash when selecting after project fails to load

This commit is contained in:
Magne Sjaastad 2018-09-14 09:54:35 +02:00
parent 43ae203dea
commit 20542d90ad

View File

@ -100,7 +100,7 @@ void RimCellEdgeColors::setReservoirView(RimEclipseView* ownerReservoirView)
//--------------------------------------------------------------------------------------------------
void RimCellEdgeColors::loadResult()
{
CVF_ASSERT(m_reservoirView && m_reservoirView->currentGridCellResults());
if (!m_reservoirView->currentGridCellResults()) return;
if (isUsingSingleVariable())
{
@ -438,6 +438,8 @@ void RimCellEdgeColors::minMaxCellEdgeValues(double& min, double& max)
globalMin = HUGE_VAL;
globalMax = -HUGE_VAL;
if (m_reservoirView->currentGridCellResults())
{
if (isUsingSingleVariable() && singleVarEdgeResultColors()->isFlowDiagOrInjectionFlooding())
{
int currentTimeStep = m_reservoirView->currentTimeStep();
@ -464,7 +466,7 @@ void RimCellEdgeColors::minMaxCellEdgeValues(double& min, double& max)
globalMin = CVF_MIN(globalMin, cMin);
globalMax = CVF_MAX(globalMax, cMax);
}
}
}
}