mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Fix crash creating RFT plot from well with well path but without LAS file
This commit is contained in:
parent
ccd839c182
commit
869ad4752f
@ -492,19 +492,23 @@ std::map<QDateTime, std::set<RimWellRftAddress>> RimWellRftPlot::timeStepsFromGr
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::map<QDateTime, std::set<RimWellRftAddress>> RimWellRftPlot::timeStepsFromWellPaths(const std::vector<RimWellPath*> wellPaths) const
|
||||
std::map<QDateTime, std::set<RimWellRftAddress> > RimWellRftPlot::timeStepsFromWellPaths(const std::vector<RimWellPath*> wellPaths) const
|
||||
{
|
||||
std::map<QDateTime, std::set<RimWellRftAddress>> timeStepsMap;
|
||||
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 (timeStepsMap.count(timeStep) == 0)
|
||||
if (wellLogFile)
|
||||
{
|
||||
timeStepsMap.insert(std::make_pair(timeStep, std::set<RimWellRftAddress>()));
|
||||
QDateTime timeStep = RiaDateStringParser::parseDateString(wellLogFile->date());
|
||||
|
||||
if ( timeStepsMap.count(timeStep) == 0 )
|
||||
{
|
||||
timeStepsMap.insert(std::make_pair(timeStep, std::set<RimWellRftAddress>()));
|
||||
}
|
||||
timeStepsMap[timeStep].insert(RimWellRftAddress(RftSourceType::OBSERVED));
|
||||
}
|
||||
timeStepsMap[timeStep].insert(RimWellRftAddress(RftSourceType::OBSERVED));
|
||||
}
|
||||
return timeStepsMap;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user