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,
|
int timeStepIndex,
|
||||||
const QString& filePath )
|
const QString& filePath )
|
||||||
{
|
{
|
||||||
auto fractureData = fractureTemplate->fractureDefinition();
|
auto fractureData = thermalFractureTemplate->fractureDefinition();
|
||||||
|
CAF_ASSERT( fractureData );
|
||||||
|
|
||||||
auto numNodes = fractureData->numNodes();
|
auto numNodes = fractureData->numNodes();
|
||||||
auto numTimeSteps = fractureData->numTimeSteps();
|
auto numTimeSteps = fractureData->numTimeSteps();
|
||||||
auto properties = fractureData->getPropertyNamesUnits();
|
auto properties = fractureData->getPropertyNamesUnits();
|
||||||
|
@ -18,6 +18,8 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <gsl/gsl>
|
||||||
|
|
||||||
class RimThermalFractureTemplate;
|
class RimThermalFractureTemplate;
|
||||||
class QString;
|
class QString;
|
||||||
|
|
||||||
@ -27,5 +29,7 @@ class QString;
|
|||||||
class RifThermalFractureTemplateSurfaceExporter
|
class RifThermalFractureTemplateSurfaceExporter
|
||||||
{
|
{
|
||||||
public:
|
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,7 +45,8 @@ RimcThermalFractureTemplate_exportToFile::RimcThermalFractureTemplate_exportToFi
|
|||||||
caf::PdmObjectHandle* RimcThermalFractureTemplate_exportToFile::execute()
|
caf::PdmObjectHandle* RimcThermalFractureTemplate_exportToFile::execute()
|
||||||
{
|
{
|
||||||
RimThermalFractureTemplate* thermalFracture = self<RimThermalFractureTemplate>();
|
RimThermalFractureTemplate* thermalFracture = self<RimThermalFractureTemplate>();
|
||||||
RifThermalFractureTemplateSurfaceExporter::writeToFile( thermalFracture, m_timeStep(), m_filePath() );
|
if ( thermalFracture && thermalFracture->fractureDefinition() )
|
||||||
|
RifThermalFractureTemplateSurfaceExporter::writeToFile( thermalFracture, m_timeStep(), m_filePath() );
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user