Avoid crash if simWellName is "None"

This commit is contained in:
Rebecca Cox
2017-11-10 13:48:11 +01:00
parent 45ef3a1f00
commit 7e6b45c626

View File

@@ -905,10 +905,10 @@ RigEclipseWellLogExtractor* RimWellLogTrack::createSimWellExtractor(RimWellLogPl
RimProject* proj = RiaApplication::instance()->project();
std::vector<const RigWellPath*> wellPaths = proj->simulationWellBranches(simWellName);
if (wellPaths.size() == 0) return nullptr;
CVF_ASSERT(branchIndex < static_cast<int>(wellPaths.size()));
if (wellPaths.size() == 0) return nullptr;
return (wellLogCollection->findOrCreateSimWellExtractor(simWellName,
QString("Find or create sim well extractor"),
wellPaths[branchIndex],