From b046a0354db1528933387cb2d2b15ba429517603 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Wed, 24 Sep 2014 13:28:08 +0200 Subject: [PATCH] Converted assert to if statement when no NNC data is present --- ApplicationCode/ReservoirDataModel/RigNNCData.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/ApplicationCode/ReservoirDataModel/RigNNCData.cpp b/ApplicationCode/ReservoirDataModel/RigNNCData.cpp index fc76ca211e..2b5abde1f0 100644 --- a/ApplicationCode/ReservoirDataModel/RigNNCData.cpp +++ b/ApplicationCode/ReservoirDataModel/RigNNCData.cpp @@ -190,12 +190,13 @@ const std::vector* RigNNCData::connectionScalarResult(size_t scalarResul void RigNNCData::setCombTransmisibilityScalarResultIndex(size_t scalarResultIndex) { std::map >::iterator it = m_connectionResults.find(cvf::UNDEFINED_SIZE_T); - CVF_ASSERT(it != m_connectionResults.end()); - - std::vector& emptyData = m_connectionResults[scalarResultIndex]; - std::vector& realData = m_connectionResults[cvf::UNDEFINED_SIZE_T]; - emptyData.swap(realData); - m_connectionResults.erase(cvf::UNDEFINED_SIZE_T); + if (it != m_connectionResults.end()) + { + std::vector& emptyData = m_connectionResults[scalarResultIndex]; + std::vector& realData = m_connectionResults[cvf::UNDEFINED_SIZE_T]; + emptyData.swap(realData); + m_connectionResults.erase(cvf::UNDEFINED_SIZE_T); + } } //--------------------------------------------------------------------------------------------------