From 886274c6f978fbee05e34e9dd341507a554211f3 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 27 Feb 2008 17:54:44 +0000 Subject: [PATCH] don't track handlers connected to this object itself (patch 1899730) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52150 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/event.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/event.cpp b/src/common/event.cpp index 6ba5895089..da4b8066bc 100644 --- a/src/common/event.cpp +++ b/src/common/event.cpp @@ -1376,7 +1376,7 @@ void wxEvtHandler::Connect( int id, int lastId, #if wxUSE_WEAKREF // Make sure we get to know when a sink is destroyed - if ( eventSink ) + if ( eventSink && eventSink != this ) { wxEventConnectionRef *evtConnRef = FindRefInTrackerList(eventSink); if ( evtConnRef ) @@ -1397,7 +1397,7 @@ bool wxEvtHandler::Disconnect( int id, int lastId, wxEventType eventType, #if wxUSE_WEAKREF // Remove connection from tracker node (wxEventConnectionRef) - if ( eventSink ) + if ( eventSink && eventSink != this ) { wxEventConnectionRef *evtConnRef = FindRefInTrackerList(eventSink); if ( evtConnRef ) -- 2.45.2