From 5cdfcba279777bc850b553ef666d76c7871b65ff Mon Sep 17 00:00:00 2001 From: eap Date: Tue, 26 Nov 2013 13:33:52 +0000 Subject: [PATCH] More safety - if ( l_d->first->IsDeletable() ) + if ( l_d->first != listener && l_d->first->IsDeletable() ) --- src/SMESH/SMESH_subMesh.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SMESH/SMESH_subMesh.cxx b/src/SMESH/SMESH_subMesh.cxx index 7b6b7dac3..df1c1b70c 100644 --- a/src/SMESH/SMESH_subMesh.cxx +++ b/src/SMESH/SMESH_subMesh.cxx @@ -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; -- 2.39.2