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
This commit is contained in:
@@ -1376,7 +1376,7 @@ void wxEvtHandler::Connect( int id, int lastId,
|
|||||||
|
|
||||||
#if wxUSE_WEAKREF
|
#if wxUSE_WEAKREF
|
||||||
// Make sure we get to know when a sink is destroyed
|
// Make sure we get to know when a sink is destroyed
|
||||||
if ( eventSink )
|
if ( eventSink && eventSink != this )
|
||||||
{
|
{
|
||||||
wxEventConnectionRef *evtConnRef = FindRefInTrackerList(eventSink);
|
wxEventConnectionRef *evtConnRef = FindRefInTrackerList(eventSink);
|
||||||
if ( evtConnRef )
|
if ( evtConnRef )
|
||||||
@@ -1397,7 +1397,7 @@ bool wxEvtHandler::Disconnect( int id, int lastId, wxEventType eventType,
|
|||||||
|
|
||||||
#if wxUSE_WEAKREF
|
#if wxUSE_WEAKREF
|
||||||
// Remove connection from tracker node (wxEventConnectionRef)
|
// Remove connection from tracker node (wxEventConnectionRef)
|
||||||
if ( eventSink )
|
if ( eventSink && eventSink != this )
|
||||||
{
|
{
|
||||||
wxEventConnectionRef *evtConnRef = FindRefInTrackerList(eventSink);
|
wxEventConnectionRef *evtConnRef = FindRefInTrackerList(eventSink);
|
||||||
if ( evtConnRef )
|
if ( evtConnRef )
|
||||||
|
Reference in New Issue
Block a user