Unregister wake up pipe file fd in ~wxConsoleEventLoop.

We must unregister the wake up pipe file descriptor which we register with the
IO dispatcher in wxConsoleEventLoop ctor, otherwise doing it the next time
(i.e. if wxConsoleEventLoop is deleted and recreated) results in asserts, at
least when using wxSelectDispatcher and not wxEpollDispatcher (i.e. under any
non-Linux Unix system).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61895 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2009-09-12 22:40:18 +00:00
parent 63f4968cd1
commit c8299fa80c

View File

@ -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;
}
}
//-----------------------------------------------------------------------------