mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Protect against crash in 3d view due to nullptr in linkwellpathfeature command check (#7876)
* Protected against crash in 3d view due to nullptr * Code cleanup
This commit is contained in:
@@ -74,10 +74,12 @@ bool RicLinkWellPathFeature::isCommandChecked()
|
||||
{
|
||||
if ( !wellPaths().empty() )
|
||||
{
|
||||
auto firstWell = dynamic_cast<RimModeledWellPath*>( wellPaths().front() );
|
||||
if ( auto geoDef = firstWell->geometryDefinition() )
|
||||
if ( auto firstWell = dynamic_cast<RimModeledWellPath*>( wellPaths().front() ) )
|
||||
{
|
||||
return geoDef->isReferencePointUpdatesLinked();
|
||||
if ( auto geoDef = firstWell->geometryDefinition() )
|
||||
{
|
||||
return geoDef->isReferencePointUpdatesLinked();
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user