Guard null pointer access

This commit is contained in:
Magne Sjaastad committed 2018-06-29 16:42:23 +02:00
1 parent 49ef8c6f55
commit 451ce82aa9
1 file changed
+2 -1
@@ -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);
}