Thermal Fracture: guard for nullptrs for surface export.

This commit is contained in:
Kristian Bendiksen
2022-09-28 08:45:34 +02:00
parent 8ed349f859
commit 8193f24a55
3 changed files with 13 additions and 6 deletions

View File

@@ -45,7 +45,8 @@ RimcThermalFractureTemplate_exportToFile::RimcThermalFractureTemplate_exportToFi
caf::PdmObjectHandle* RimcThermalFractureTemplate_exportToFile::execute()
{
RimThermalFractureTemplate* thermalFracture = self<RimThermalFractureTemplate>();
RifThermalFractureTemplateSurfaceExporter::writeToFile( thermalFracture, m_timeStep(), m_filePath() );
if ( thermalFracture && thermalFracture->fractureDefinition() )
RifThermalFractureTemplateSurfaceExporter::writeToFile( thermalFracture, m_timeStep(), m_filePath() );
return nullptr;
}