remove the event handler being deleted from pending events list (closes #10997)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@61438 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1087,14 +1087,18 @@ wxEvtHandler::~wxEvtHandler()
|
|||||||
// Remove us from wxPendingEvents if necessary.
|
// Remove us from wxPendingEvents if necessary.
|
||||||
if(wxPendingEventsLocker)
|
if(wxPendingEventsLocker)
|
||||||
wxENTER_CRIT_SECT(*wxPendingEventsLocker);
|
wxENTER_CRIT_SECT(*wxPendingEventsLocker);
|
||||||
|
#endif // wxUSE_THREADS
|
||||||
|
|
||||||
if ( wxPendingEvents )
|
if ( wxPendingEvents )
|
||||||
{
|
{
|
||||||
// Delete all occurences of this from the list of pending events
|
// Delete all occurences of this from the list of pending events
|
||||||
while (wxPendingEvents->DeleteObject(this)) { } // Do nothing
|
while (wxPendingEvents->DeleteObject(this)) { } // Do nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if wxUSE_THREADS
|
||||||
if(wxPendingEventsLocker)
|
if(wxPendingEventsLocker)
|
||||||
wxLEAVE_CRIT_SECT(*wxPendingEventsLocker);
|
wxLEAVE_CRIT_SECT(*wxPendingEventsLocker);
|
||||||
#endif
|
#endif // wxUSE_THREADS
|
||||||
|
|
||||||
// we only delete object data, not untyped
|
// we only delete object data, not untyped
|
||||||
if ( m_clientDataType == wxClientData_Object )
|
if ( m_clientDataType == wxClientData_Object )
|
||||||
|
Reference in New Issue
Block a user