mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1845 RFT/PLT Plot: Avoid crash when formation names does not exist
This commit is contained in:
parent
80ee785e5e
commit
e40d41fe68
@ -888,6 +888,8 @@ void RimWellLogTrack::findFormationNamesToPlot(const CurveSamplingPointData&
|
||||
std::vector<QString>* formationNamesToPlot,
|
||||
std::vector<std::pair<double, double>>* yValues)
|
||||
{
|
||||
if (formationNamesVector.empty()) return;
|
||||
|
||||
std::vector<size_t> formationNameIndicesFromCurve;
|
||||
|
||||
for (double nameIdx : curveData.data)
|
||||
@ -946,16 +948,20 @@ std::vector<QString> RimWellLogTrack::formationNamesVector(RimCase* rimCase)
|
||||
|
||||
if (eclipseCase)
|
||||
{
|
||||
return eclipseCase->eclipseCaseData()->activeFormationNames()->formationNames();
|
||||
if (eclipseCase->eclipseCaseData()->activeFormationNames())
|
||||
{
|
||||
return eclipseCase->eclipseCaseData()->activeFormationNames()->formationNames();
|
||||
}
|
||||
}
|
||||
else if (geoMechCase)
|
||||
{
|
||||
return geoMechCase->geoMechData()->femPartResults()->activeFormationNames()->formationNames();
|
||||
}
|
||||
else
|
||||
{
|
||||
return std::vector<QString>();
|
||||
if (geoMechCase->geoMechData()->femPartResults()->activeFormationNames())
|
||||
{
|
||||
return geoMechCase->geoMechData()->femPartResults()->activeFormationNames()->formationNames();
|
||||
}
|
||||
}
|
||||
|
||||
return std::vector<QString>();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user