From 78be5b351e2210b762d25bc04829fd2ab4f5bb32 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Fri, 15 Dec 2017 13:08:15 +0100 Subject: [PATCH] Remove asserts from defineEditorAttribute --- .../Completions/RimWellPathFracture.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/ApplicationCode/ProjectDataModel/Completions/RimWellPathFracture.cpp b/ApplicationCode/ProjectDataModel/Completions/RimWellPathFracture.cpp index 9d902bf36d..9721a871d5 100644 --- a/ApplicationCode/ProjectDataModel/Completions/RimWellPathFracture.cpp +++ b/ApplicationCode/ProjectDataModel/Completions/RimWellPathFracture.cpp @@ -194,16 +194,15 @@ void RimWellPathFracture::defineEditorAttribute(const caf::PdmFieldHandle* field { RimWellPath* rimWellPath = nullptr; this->firstAncestorOrThisOfType(rimWellPath); - CVF_ASSERT(rimWellPath); + if (!rimWellPath) return; RigWellPath* wellPathGeo = rimWellPath->wellPathGeometry(); - CVF_ASSERT(wellPathGeo); + if (!wellPathGeo) return; + + if (wellPathGeo->m_measuredDepths.size() > 2) { - if (wellPathGeo->m_measuredDepths.size() > 2) - { - myAttr->m_minimum = wellPathGeo->m_measuredDepths.front(); - myAttr->m_maximum = wellPathGeo->m_measuredDepths.back(); - } + myAttr->m_minimum = wellPathGeo->m_measuredDepths.front(); + myAttr->m_maximum = wellPathGeo->m_measuredDepths.back(); } } }