From 44b9e52e1bd51373ba5e797c2a36dc3c7a2aec62 Mon Sep 17 00:00:00 2001 From: Kristian Bendiksen Date: Tue, 5 Nov 2019 13:32:13 +0100 Subject: [PATCH] #4965 Fix crash when importing Eclipse input case. Added guard to avoid importing faults from the input property files when faults already exists in the eclipse case. Faults can theoretically appear in any of the files, but reading and appending them to the existing fault collection is not currently supported. --- .../FileInterface/RifEclipseInputPropertyLoader.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ApplicationCode/FileInterface/RifEclipseInputPropertyLoader.cpp b/ApplicationCode/FileInterface/RifEclipseInputPropertyLoader.cpp index 24a44ab2dd..761176061c 100644 --- a/ApplicationCode/FileInterface/RifEclipseInputPropertyLoader.cpp +++ b/ApplicationCode/FileInterface/RifEclipseInputPropertyLoader.cpp @@ -103,7 +103,10 @@ bool RifEclipseInputPropertyLoader::readInputPropertiesFromFiles( RimEclipseInpu inputPropertyCollection->inputProperties.push_back( inputProperty ); } - if ( importFaults ) + // Avoid importing faults from the input property files when faults already exists in + // the eclipse case. Faults can theoretically appear in any of the files, but reading + // and appending them to the existing fault collection is not currently supported. + if ( importFaults && eclipseCaseData->mainGrid()->faults().empty() ) { cvf::Collection faultCollection; RifEclipseInputFileTools::parseAndReadFaults( propertyFileName, &faultCollection );