Fix dangling references to annotations from fracture model after save.

This commit is contained in:
Kristian Bendiksen 2020-10-06 15:10:05 +02:00
parent bcc35ee82e
commit 34c1ac35e5

View File

@ -207,8 +207,6 @@ RimFractureModel::RimFractureModel()
//--------------------------------------------------------------------------------------------------
RimFractureModel::~RimFractureModel()
{
clearBarrierAnnotation();
RimWellPath* wellPath = m_thicknessDirectionWellPath.value();
RimWellPathCollection* wellPathCollection = RimTools::wellPathCollection();
@ -715,7 +713,10 @@ void RimFractureModel::clearBarrierAnnotation()
}
RimAnnotationCollectionBase* coll = annotationCollection();
coll->onAnnotationDeleted();
if ( coll )
{
coll->onAnnotationDeleted();
}
}
//--------------------------------------------------------------------------------------------------