mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Fix crash when copying the intersection.
Updating of the default is handled later, so is not neccesary when doint initAfterRead after deserialization.
This commit is contained in:
parent
dcb32c285f
commit
439071dddf
@ -184,13 +184,17 @@ void RimIntersectionHandle::updateDefaultSeparateDataSource()
|
||||
if ( m_separateDataSource() == nullptr )
|
||||
{
|
||||
RimGridView* view;
|
||||
this->firstAncestorOrThisOfTypeAsserted( view );
|
||||
this->firstAncestorOrThisOfType( view );
|
||||
|
||||
std::vector<RimIntersectionResultDefinition*> iResDefs =
|
||||
view->separateIntersectionResultsCollection()->intersectionResultsDefinitions();
|
||||
if ( iResDefs.size() )
|
||||
if ( view )
|
||||
{
|
||||
m_separateDataSource = iResDefs[0];
|
||||
std::vector<RimIntersectionResultDefinition*> iResDefs =
|
||||
view->separateIntersectionResultsCollection()->intersectionResultsDefinitions();
|
||||
|
||||
if ( iResDefs.size() )
|
||||
{
|
||||
m_separateDataSource = iResDefs[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -203,6 +207,8 @@ cvf::ref<RivIntersectionHexGridInterface> RimIntersectionHandle::createHexGridIn
|
||||
RimIntersectionResultDefinition* resDef = activeSeparateResultDefinition();
|
||||
if ( resDef && resDef->activeCase() )
|
||||
{
|
||||
// Eclipse case
|
||||
|
||||
RimEclipseCase* eclipseCase = dynamic_cast<RimEclipseCase*>( resDef->activeCase() );
|
||||
if ( eclipseCase && eclipseCase->eclipseCaseData() )
|
||||
{
|
||||
@ -212,6 +218,8 @@ cvf::ref<RivIntersectionHexGridInterface> RimIntersectionHandle::createHexGridIn
|
||||
this->isInactiveCellsVisible() );
|
||||
}
|
||||
|
||||
// Geomech case
|
||||
|
||||
RimGeoMechCase* geomCase = dynamic_cast<RimGeoMechCase*>( resDef->activeCase() );
|
||||
|
||||
if ( geomCase && geomCase->geoMechData() && geomCase->geoMechData()->femParts() )
|
||||
|
Loading…
Reference in New Issue
Block a user