#2595 Fix crash when opening well log LAS curve without connection to well path

This commit is contained in:
Rebecca Cox 2018-03-14 13:38:59 +01:00
parent d3361d22dd
commit 04520c8446

View File

@ -332,6 +332,8 @@ QList<caf::PdmOptionItemInfo> RimWellLogFileCurve::calculateValueOptions(const c
//--------------------------------------------------------------------------------------------------
void RimWellLogFileCurve::initAfterRead()
{
if (!m_wellPath) return;
if (m_wellPath->wellLogFiles().size() == 1)
{
m_wellLogFile = m_wellPath->wellLogFiles().front();
@ -420,5 +422,10 @@ RimWellLogFile* RimWellLogFileCurve::wellLogFile() const
//--------------------------------------------------------------------------------------------------
QString RimWellLogFileCurve::wellName() const
{
return m_wellPath->name();
if (m_wellPath)
{
return m_wellPath->name();
}
return QString("");
}