From: eap Date: Sat, 6 May 2006 07:51:53 +0000 (+0000) Subject: In ExtrusionAlongPath(), prevent SIGSEGV on an empty path submesh X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=59cc20197f3a760a73ef3ef12137af516bab572c;p=modules%2Fsmesh.git In ExtrusionAlongPath(), prevent SIGSEGV on an empty path submesh --- diff --git a/src/SMESH_I/SMESH_MeshEditor_i.cxx b/src/SMESH_I/SMESH_MeshEditor_i.cxx index 0f9cd70c5..5bc2da5c5 100644 --- a/src/SMESH_I/SMESH_MeshEditor_i.cxx +++ b/src/SMESH_I/SMESH_MeshEditor_i.cxx @@ -1250,7 +1250,7 @@ SMESH::SMESH_MeshEditor::Extrusion_Error TopoDS_Shape aShape = SMESH_Gen_i::GetSMESHGen()->GeomObjectToShape( thePathShape ); SMESH_subMesh* aSubMesh = aMeshImp->GetImpl().GetSubMesh( aShape ); - if ( !aSubMesh ) + if ( !aSubMesh || !aSubMesh->GetSubMeshDS()) return SMESH::SMESH_MeshEditor::EXTR_BAD_PATH_SHAPE; SMDS_MeshNode* nodeStart = (SMDS_MeshNode*)aMeshImp->GetImpl().GetMeshDS()->FindNode(theNodeStart);