0020340: EDF 1022 SMESH : Crash with FindNodeClosestTo in a second new study

notify node searcher on mesh destruction
This commit is contained in:
eap 2009-05-06 13:17:33 +00:00
parent 83e685ca5c
commit fd97cbec7c

View File

@ -110,6 +110,11 @@ SMESH_Mesh::~SMESH_Mesh()
{ {
INFOS("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 // delete groups
std::map < int, SMESH_Group * >::iterator itg; std::map < int, SMESH_Group * >::iterator itg;
for (itg = _mapGroup.begin(); itg != _mapGroup.end(); itg++) { for (itg = _mapGroup.begin(); itg != _mapGroup.end(); itg++) {