mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-12 16:32:12 -05:00
Janitor : Guard nullpointer access
This commit is contained in:
1 parent
d79dcafe5a
commit
93b5c39387
1 file changed
+6
-2
@@ -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;
|
||||
}
|
||||
Reference in new issue
Block a user