mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Guard null pointer access
This commit is contained in:
@@ -1035,9 +1035,10 @@ cvf::ref<RivIntersectionHexGridInterface> RivIntersectionPartMgr::createHexGridI
|
||||
|
||||
RimGeoMechView* geoView;
|
||||
m_rimCrossSection->firstAncestorOrThisOfType(geoView);
|
||||
if (geoView)
|
||||
if (geoView && geoView->femParts() && geoView->femParts()->partCount())
|
||||
{
|
||||
RigFemPart* femPart = geoView->femParts()->part(0);
|
||||
|
||||
return new RivFemIntersectionGrid(femPart);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user