X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/68888eeaa8d84ed54ff8854110f488ad1c5054e9..0995b9dc18a7ce898c1c1be0e2790b258cab0fee:/tests/net/socket.cpp diff --git a/tests/net/socket.cpp b/tests/net/socket.cpp index 5928915e41..aece666280 100644 --- a/tests/net/socket.cpp +++ b/tests/net/socket.cpp @@ -4,7 +4,7 @@ // Author: Vadim Zeitlin // RCS-ID: $Id$ // Copyright: (c) 2008 Vadim Zeitlin -// Licence: wxWidgets licence +// Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// /* @@ -68,17 +68,23 @@ private: { m_useLoop = useLoop; if ( useLoop ) + { + m_evtLoopOld = wxEventLoopBase::GetActive(); SetActive(this); + } } virtual ~SocketTestEventLoop() { if ( m_useLoop ) - SetActive(NULL); + { + wxEventLoopBase::SetActive(m_evtLoopOld); + } } private: bool m_useLoop; + wxEventLoopBase *m_evtLoopOld; }; // get the address to connect to, if NULL is returned it means that the