]> git.saurik.com Git - wxWidgets.git/commitdiff
don't track handlers connected to this object itself (patch 1899730)
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 27 Feb 2008 17:54:44 +0000 (17:54 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 27 Feb 2008 17:54:44 +0000 (17:54 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52150 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/event.cpp

index 6ba58950899f36ce1a528e757c9e6d4492ae598d..da4b8066bc4092c446f73259415f1fc1812af900 100644 (file)
@@ -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 )