mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Janitor : Guard nullpointer access
This commit is contained in:
parent
d79dcafe5a
commit
93b5c39387
@ -81,7 +81,11 @@ RimWellPathGeometryDef* RicLinkWellPathFeature::wellPathGeometryDef()
|
||||
auto wellPathSelectionItem = RiuWellPathSelectionItem::wellPathSelectionItem();
|
||||
if ( wellPathSelectionItem && wellPathSelectionItem->m_wellpath )
|
||||
{
|
||||
auto modeledWellPath = dynamic_cast<RimModeledWellPath*>( wellPathSelectionItem->m_wellpath );
|
||||
return modeledWellPath->geometryDefinition();
|
||||
if ( auto modeledWellPath = dynamic_cast<RimModeledWellPath*>( wellPathSelectionItem->m_wellpath ) )
|
||||
{
|
||||
return modeledWellPath->geometryDefinition();
|
||||
}
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user