fix race condition which could result in assert failures in debug builds and infinite loops in release (#9094)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@56712 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1142,8 +1142,6 @@ void wxEvtHandler::AddPendingEvent(wxEvent& event)
|
||||
|
||||
m_pendingEvents->Append(eventCopy);
|
||||
|
||||
wxLEAVE_CRIT_SECT( Lock() );
|
||||
|
||||
// 2) Add this event handler to list of event handlers that
|
||||
// have pending events.
|
||||
|
||||
@@ -1155,6 +1153,8 @@ void wxEvtHandler::AddPendingEvent(wxEvent& event)
|
||||
|
||||
wxLEAVE_CRIT_SECT(*wxPendingEventsLocker);
|
||||
|
||||
wxLEAVE_CRIT_SECT( Lock() );
|
||||
|
||||
// 3) Inform the system that new pending events are somewhere,
|
||||
// and that these should be processed in idle time.
|
||||
wxWakeUpIdle();
|
||||
|
Reference in New Issue
Block a user