Fix crash creating RFT plot from well with well path but without LAS file

This commit is contained in:
Jacob Støren
2017-10-13 16:11:37 +02:00
parent ccd839c182
commit 869ad4752f

View File

@@ -497,8 +497,11 @@ std::map<QDateTime, std::set<RimWellRftAddress>> RimWellRftPlot::timeStepsFromWe
std::map<QDateTime, std::set<RimWellRftAddress> > timeStepsMap;
for (const auto& wellPath : wellPaths)
{
auto wellLogFile = wellPath->wellLogFile();
auto timeStep = RiaDateStringParser::parseDateString(wellLogFile->date());
RimWellLogFile* wellLogFile = wellPath->wellLogFile();
if (wellLogFile)
{
QDateTime timeStep = RiaDateStringParser::parseDateString(wellLogFile->date());
if ( timeStepsMap.count(timeStep) == 0 )
{
@@ -506,6 +509,7 @@ std::map<QDateTime, std::set<RimWellRftAddress>> RimWellRftPlot::timeStepsFromWe
}
timeStepsMap[timeStep].insert(RimWellRftAddress(RftSourceType::OBSERVED));
}
}
return timeStepsMap;
}