protect from SIGSEGV in case of "Composite Wire Discretization" usage

This commit is contained in:
eap 2012-10-10 10:46:53 +00:00
parent 798c633011
commit bd01d75a47

View File

@ -2215,7 +2215,7 @@ TopoDS_Edge StdMeshers_PrismAsBlock::TSideFace::GetEdge(const int iEdge) const
// find edge by 2 vertices
TopoDS_Shape V1 = edge;
TopoDS_Shape V2 = myHelper->GetSubShapeByNode( node, meshDS );
if ( V2.ShapeType() == TopAbs_VERTEX && !V2.IsSame( V1 ))
if ( !V2.IsNull() && V2.ShapeType() == TopAbs_VERTEX && !V2.IsSame( V1 ))
{
TopoDS_Shape ancestor = myHelper->GetCommonAncestor( V1, V2, *myHelper->GetMesh(), TopAbs_EDGE);
if ( !ancestor.IsNull() )