Fix crash in unit tests

This commit is contained in:
Gaute Lindkvist 2019-04-02 12:46:46 +02:00
parent ab7dd90483
commit 716ac4bf83
2 changed files with 5 additions and 5 deletions

View File

@ -70,8 +70,8 @@ void RicExportEclipseSectorModelUi::GridBoxSelectionEnum::setUp()
///
//--------------------------------------------------------------------------------------------------
RicExportEclipseSectorModelUi::RicExportEclipseSectorModelUi(RigEclipseCaseData* caseData /*= nullptr*/,
const cvf::Vec3i& visibleMin /*= cvf::Vec3i::ZERO*/,
const cvf::Vec3i& visibleMax /*= cvf::Vec3i::ZERO*/)
const cvf::Vec3i& visibleMin /*= cvf::Vec3i::ZERO*/,
const cvf::Vec3i& visibleMax /*= cvf::Vec3i::ZERO*/)
: m_caseData(caseData)
, m_visibleMin(visibleMin)
, m_visibleMax(visibleMax)
@ -122,7 +122,7 @@ RicExportEclipseSectorModelUi::RicExportEclipseSectorModelUi(RigEclipseCaseData*
for (QString keyword : mainKeywords())
{
if (caseData->results(RiaDefines::MATRIX_MODEL)->hasResultEntry(RigEclipseResultAddress(RiaDefines::STATIC_NATIVE, keyword)))
if (caseData && caseData->results(RiaDefines::MATRIX_MODEL)->hasResultEntry(RigEclipseResultAddress(RiaDefines::STATIC_NATIVE, keyword)))
{
selectedKeywords.v().push_back(keyword);
}

View File

@ -61,8 +61,8 @@ class RicExportEclipseSectorModelUi : public caf::PdmObject
public:
RicExportEclipseSectorModelUi(RigEclipseCaseData* caseData = nullptr,
const cvf::Vec3i& visibleMin = cvf::Vec3i::ZERO,
const cvf::Vec3i& visibleMax = cvf::Vec3i::ZERO);
const cvf::Vec3i& visibleMin = cvf::Vec3i::ZERO,
const cvf::Vec3i& visibleMax = cvf::Vec3i::ZERO);
~RicExportEclipseSectorModelUi() override;
const QStringList& tabNames() const;