build fix for !wxUSE_THREADS

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51140 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Paul Cornett
2008-01-10 06:00:22 +00:00
parent 3384e744dd
commit 364ab6cc8a

View File

@@ -1116,8 +1116,10 @@ wxEvtHandler::~wxEvtHandler()
// Remove us from wxPendingEvents if necessary. // Remove us from wxPendingEvents if necessary.
if ( wxPendingEvents ) if ( wxPendingEvents )
{ {
#if wxUSE_THREADS
if(wxPendingEventsLocker) if(wxPendingEventsLocker)
wxENTER_CRIT_SECT(*wxPendingEventsLocker); wxENTER_CRIT_SECT(*wxPendingEventsLocker);
#endif
if ( wxPendingEvents->DeleteObject(this) ) if ( wxPendingEvents->DeleteObject(this) )
{ {
@@ -1127,8 +1129,10 @@ wxEvtHandler::~wxEvtHandler()
} }
//else: we weren't in this list at all, it's ok //else: we weren't in this list at all, it's ok
#if wxUSE_THREADS
if(wxPendingEventsLocker) if(wxPendingEventsLocker)
wxLEAVE_CRIT_SECT(*wxPendingEventsLocker); wxLEAVE_CRIT_SECT(*wxPendingEventsLocker);
#endif
} }
// we only delete object data, not untyped // we only delete object data, not untyped