]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
protect from SIGSEGV in case of "Composite Wire Discretization" usage
authoreap <eap@opencascade.com>
Wed, 10 Oct 2012 10:46:53 +0000 (10:46 +0000)
committereap <eap@opencascade.com>
Wed, 10 Oct 2012 10:46:53 +0000 (10:46 +0000)
src/StdMeshers/StdMeshers_Prism_3D.cxx

index c4c421c80f307aa0d1519d342eef174dfd097a03..85eaef56619c46b5d460884730c24d96960fecd0 100644 (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() )