]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
0020340: EDF 1022 SMESH : Crash with FindNodeClosestTo in a second new study
authoreap <eap@opencascade.com>
Wed, 6 May 2009 13:17:33 +0000 (13:17 +0000)
committereap <eap@opencascade.com>
Wed, 6 May 2009 13:17:33 +0000 (13:17 +0000)
    notify node searcher on mesh destruction

src/SMESH/SMESH_Mesh.cxx

index b1cdde266031dfbd6327d4b0dddd66181de740ff..5ddf9a5157cf9e6c54f42e9c726dd9325a80da85 100644 (file)
@@ -110,6 +110,11 @@ SMESH_Mesh::~SMESH_Mesh()
 {
   INFOS("SMESH_Mesh::~SMESH_Mesh");
 
+  // issue 0020340: EDF 1022 SMESH : Crash with FindNodeClosestTo in a second new study
+  //   Notify event listeners at least that something happens
+  if ( SMESH_subMesh * sm = GetSubMeshContaining(1))
+    sm->ComputeStateEngine( SMESH_subMesh::MESH_ENTITY_REMOVED );
+
   // delete groups
   std::map < int, SMESH_Group * >::iterator itg;
   for (itg = _mapGroup.begin(); itg != _mapGroup.end(); itg++) {