WBS: Fix crash when importing CSV into existing WBS.

This commit is contained in:
Kristian Bendiksen 2024-02-28 08:32:49 +01:00 committed by jonjenssen
parent b33d117784
commit 2f3a20c73c

View File

@ -118,6 +118,8 @@ std::vector<std::pair<double, double>> RimWellLogCsvFile::findMdAndChannelValues
for ( RimWellLogCsvFile* wellLogFile : wellLogFiles ) for ( RimWellLogCsvFile* wellLogFile : wellLogFiles )
{ {
RigWellLogCsvFile* fileData = wellLogFile->wellLogFileData(); RigWellLogCsvFile* fileData = wellLogFile->wellLogFileData();
if ( fileData )
{
std::vector<double> channelValues = fileData->values( channelName ); std::vector<double> channelValues = fileData->values( channelName );
if ( !channelValues.empty() ) if ( !channelValues.empty() )
{ {
@ -135,6 +137,7 @@ std::vector<std::pair<double, double>> RimWellLogCsvFile::findMdAndChannelValues
return depthValuePairs; return depthValuePairs;
} }
} }
}
return std::vector<std::pair<double, double>>(); return std::vector<std::pair<double, double>>();
} }