X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/526954c5968baa29218c994ec48e476ae2bd4b9f..0995b9dc18a7ce898c1c1be0e2790b258cab0fee:/tests/net/socket.cpp diff --git a/tests/net/socket.cpp b/tests/net/socket.cpp index 67d8b5157b..aece666280 100644 --- a/tests/net/socket.cpp +++ b/tests/net/socket.cpp @@ -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