Salome HOME
22573: [CEA 1154] Regression on a blsurf mesh (crash on test_periodicity_LR_ONLY.py)
[modules/smesh.git] / src / SMESH / SMESH_subMesh.cxx
index a7b015260631705e396ff8193615a2d1dd96fa5f..6545ef40ceb6c2fc04b31c00609d4f325955103a 100644 (file)
@@ -2469,7 +2469,9 @@ void SMESH_subMesh::deleteOwnListeners()
   {
     if ( !_father->MeshExists( d->myMeshID ))
       continue;
-    if ( _father->GetId() == d->myMeshID && !_father->GetSubMeshContaining( d->mySubMeshID ))
+    if ( _father->GetId() == d->myMeshID &&
+         this->GetId()    != d->mySubMeshID &&
+         !_father->GetSubMeshContaining( d->mySubMeshID ))
       continue;
     d->mySubMesh->DeleteEventListener( d->myListener );
   }