In ExtrusionAlongPath(), prevent SIGSEGV on an empty path submesh

This commit is contained in:
eap 2006-05-06 07:51:53 +00:00
parent c2805b7c74
commit 59cc20197f

View File

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