X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c22ace4dff0629aa55f5afb9fa7d77334d27409b..a8030f0eaa33c2824d2277e25c93c1ef23d338a8:/src/unix/evtloopunix.cpp?ds=sidebyside diff --git a/src/unix/evtloopunix.cpp b/src/unix/evtloopunix.cpp index 5797b5eedb..3baef89f9b 100644 --- a/src/unix/evtloopunix.cpp +++ b/src/unix/evtloopunix.cpp @@ -37,7 +37,7 @@ #include "wx/unix/private/epolldispatcher.h" #include "wx/private/selectdispatcher.h" -#define TRACE_EVENTS _T("events") +#define TRACE_EVENTS wxT("events") // =========================================================================== // wxEventLoop::PipeIOHandler implementation @@ -176,7 +176,15 @@ wxConsoleEventLoop::wxConsoleEventLoop() wxConsoleEventLoop::~wxConsoleEventLoop() { - delete m_wakeupPipe; + if ( m_wakeupPipe ) + { + if ( m_dispatcher ) + { + m_dispatcher->UnregisterFD(m_wakeupPipe->GetReadFd()); + } + + delete m_wakeupPipe; + } } //-----------------------------------------------------------------------------