mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Thermal Fracture: guard for nullptrs for surface export.
This commit is contained in:
parent
8ed349f859
commit
8193f24a55
@ -27,11 +27,13 @@
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RifThermalFractureTemplateSurfaceExporter::writeToFile( RimThermalFractureTemplate* fractureTemplate,
|
||||
bool RifThermalFractureTemplateSurfaceExporter::writeToFile( gsl::not_null<RimThermalFractureTemplate*> thermalFractureTemplate,
|
||||
int timeStepIndex,
|
||||
const QString& filePath )
|
||||
{
|
||||
auto fractureData = fractureTemplate->fractureDefinition();
|
||||
auto fractureData = thermalFractureTemplate->fractureDefinition();
|
||||
CAF_ASSERT( fractureData );
|
||||
|
||||
auto numNodes = fractureData->numNodes();
|
||||
auto numTimeSteps = fractureData->numTimeSteps();
|
||||
auto properties = fractureData->getPropertyNamesUnits();
|
||||
|
@ -18,6 +18,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <gsl/gsl>
|
||||
|
||||
class RimThermalFractureTemplate;
|
||||
class QString;
|
||||
|
||||
@ -27,5 +29,7 @@ class QString;
|
||||
class RifThermalFractureTemplateSurfaceExporter
|
||||
{
|
||||
public:
|
||||
static bool writeToFile( RimThermalFractureTemplate* stimPlanModel, int timeStep, const QString& filePath );
|
||||
static bool writeToFile( gsl::not_null<RimThermalFractureTemplate*> thermalFractureTemplate,
|
||||
int timeStep,
|
||||
const QString& filePath );
|
||||
};
|
||||
|
@ -45,6 +45,7 @@ RimcThermalFractureTemplate_exportToFile::RimcThermalFractureTemplate_exportToFi
|
||||
caf::PdmObjectHandle* RimcThermalFractureTemplate_exportToFile::execute()
|
||||
{
|
||||
RimThermalFractureTemplate* thermalFracture = self<RimThermalFractureTemplate>();
|
||||
if ( thermalFracture && thermalFracture->fractureDefinition() )
|
||||
RifThermalFractureTemplateSurfaceExporter::writeToFile( thermalFracture, m_timeStep(), m_filePath() );
|
||||
return nullptr;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user