]> git.saurik.com Git - wxWidgets.git/blobdiff - src/unix/evtloopunix.cpp
Applied #10753: WarpPointer() for Mac
[wxWidgets.git] / src / unix / evtloopunix.cpp
index 5797b5eedb9e88abcf1f18143dea2c43e00ad959..3baef89f9bbbe9fd421461af2678ba8db9828d5c 100644 (file)
@@ -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;
+    }
 }
 
 //-----------------------------------------------------------------------------