PVT Plot: Added guarding to prevent access visolations when querying dynamic properties for PVT plots in cases where initialization of PVT curve collection fails.

This commit is contained in:
sigurdp
2017-12-05 16:16:58 +01:00
parent e12a931940
commit a285ae8f61

View File

@@ -733,6 +733,12 @@ bool RigFlowDiagSolverInterface::calculatePvtDynamicPropertiesFvf(size_t activeC
return false;
}
CVF_ASSERT(m_opmFlowDiagStaticData.notNull());
if (!m_opmFlowDiagStaticData->m_eclPvtCurveCollection)
{
return false;
}
// Bo
{
std::vector<double> phasePress = { pressure };
@@ -771,6 +777,12 @@ bool RigFlowDiagSolverInterface::calculatePvtDynamicPropertiesViscosity(size_t a
return false;
}
CVF_ASSERT(m_opmFlowDiagStaticData.notNull());
if (!m_opmFlowDiagStaticData->m_eclPvtCurveCollection)
{
return false;
}
// mu_o
{
std::vector<double> phasePress = { pressure };