Avoid crash if simWellName is "None"

This commit is contained in:
Rebecca Cox committed 2017-11-13 07:55:22 +01:00
1 parent 45ef3a1f00
commit 7e6b45c626
1 file changed
+2 -2
@@ -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],