From bd01d75a47b9fe9bae67884d98b9dee345cc0cca Mon Sep 17 00:00:00 2001 From: eap Date: Wed, 10 Oct 2012 10:46:53 +0000 Subject: [PATCH] protect from SIGSEGV in case of "Composite Wire Discretization" usage --- src/StdMeshers/StdMeshers_Prism_3D.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/StdMeshers/StdMeshers_Prism_3D.cxx b/src/StdMeshers/StdMeshers_Prism_3D.cxx index c4c421c80..85eaef566 100644 --- a/src/StdMeshers/StdMeshers_Prism_3D.cxx +++ b/src/StdMeshers/StdMeshers_Prism_3D.cxx @@ -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() ) -- 2.39.2