mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Remove uncessary method call that causes crash during copy.
Add some more safeguards in code.
This commit is contained in:
parent
9ef37aca98
commit
5f10732d1e
@ -140,7 +140,6 @@ caf::PdmFieldHandle* RimIntersection::objectToggleField()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimIntersection::initAfterRead()
|
||||
{
|
||||
updateDefaultSeparateDataSource();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -171,12 +170,16 @@ void RimIntersection::updateDefaultSeparateDataSource()
|
||||
{
|
||||
if ( m_separateDataSource() == nullptr )
|
||||
{
|
||||
std::vector<RimIntersectionResultDefinition*> iResDefs =
|
||||
findSeparateResultsCollection()->intersectionResultsDefinitions();
|
||||
RimIntersectionResultsDefinitionCollection* defcoll = findSeparateResultsCollection();
|
||||
|
||||
if ( iResDefs.size() )
|
||||
if ( defcoll )
|
||||
{
|
||||
m_separateDataSource = iResDefs[0];
|
||||
std::vector<RimIntersectionResultDefinition*> iResDefs = defcoll->intersectionResultsDefinitions();
|
||||
|
||||
if ( iResDefs.size() )
|
||||
{
|
||||
m_separateDataSource = iResDefs[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user