]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
More safety
authoreap <eap@opencascade.com>
Tue, 26 Nov 2013 13:33:52 +0000 (13:33 +0000)
committereap <eap@opencascade.com>
Tue, 26 Nov 2013 13:33:52 +0000 (13:33 +0000)
-        if ( l_d->first->IsDeletable() )
+        if ( l_d->first != listener && l_d->first->IsDeletable() )

src/SMESH/SMESH_subMesh.cxx

index 7b6b7dac3545496e5d0c16e79d9f2bc52de4fb55..df1c1b70cc14929a2712e29fcd806bf009c80844 100644 (file)
@@ -2288,7 +2288,7 @@ void SMESH_subMesh::setEventListener(EventListener*     listener,
         EventListenerData* curData = l_d->second;
         if ( curData && curData != data && curData->IsDeletable() )
           delete curData;
-        if ( l_d->first->IsDeletable() )
+        if ( l_d->first != listener && l_d->first->IsDeletable() )
           delete l_d->first;
         _eventListeners.erase( l_d );
         break;