]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
In ExtrusionAlongPath(), prevent SIGSEGV on an empty path submesh
authoreap <eap@opencascade.com>
Sat, 6 May 2006 07:51:53 +0000 (07:51 +0000)
committereap <eap@opencascade.com>
Sat, 6 May 2006 07:51:53 +0000 (07:51 +0000)
src/SMESH_I/SMESH_MeshEditor_i.cxx

index 0f9cd70c5cd937aad3004185d7179f23b44f7802..5bc2da5c529e87ededddcfed41f6ec87fab8731d 100644 (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);