Handle no data gracefully

This commit is contained in:
Magne Sjaastad
2015-09-18 09:05:15 +02:00
parent 2ebb60e468
commit b3620355de
2 changed files with 24 additions and 2 deletions

View File

@@ -130,5 +130,11 @@ std::vector<double> RigWellLogFile::values(const QString& name) const
// TODO: Possibly handle discrete logs
CVF_ASSERT(m_wellLogFile);
return m_wellLogFile->GetContLog(name.toStdString());
if (m_wellLogFile->HasContLog(name.toStdString()))
{
return m_wellLogFile->GetContLog(name.toStdString());
}
return std::vector<double>();
}