Guard null pointer access

This commit is contained in:
Magne Sjaastad
2018-06-29 16:41:14 +02:00
parent 49ef8c6f55
commit 451ce82aa9

View File

@@ -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);
}