WellPathCollection. Fix crash

This commit is contained in:
Bjørn Erik Jensen 2017-11-14 11:35:33 +01:00
parent 018549d15a
commit dc11cbd4c5

View File

@ -244,6 +244,11 @@ void RimWellPathCollection::readAndAddWellPaths(std::vector<RimWellPath*>& wellP
interpolatedWellColors = caf::ColorTable::interpolateColorArray(wellColors, wellPathArray.size());
}
if (!wellPathArray.empty())
{
m_newestAddedWellName = wellPathArray.back()->name();
}
for (size_t wpIdx = 0; wpIdx < wellPathArray.size(); wpIdx++)
{
RimWellPath* wellPath = wellPathArray[wpIdx];
@ -274,11 +279,6 @@ void RimWellPathCollection::readAndAddWellPaths(std::vector<RimWellPath*>& wellP
progress.incrementProgress();
}
if (!wellPathArray.empty())
{
m_newestAddedWellName = wellPathArray.back()->name();
}
this->sortWellsByName();
}