X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/11a0827d14ad03dbdcff1de1067a8fd440dac330..893bf460693cc0af39da7211dad96c3b62fded08:/src/x11/app.cpp diff --git a/src/x11/app.cpp b/src/x11/app.cpp index 90ea2a60af..4c9868ce0c 100644 --- a/src/x11/app.cpp +++ b/src/x11/app.cpp @@ -793,14 +793,7 @@ bool wxApp::Yield(bool onlyIfNeeded) // Make sure we have an event loop object, // or Pending/Dispatch will fail - wxEventLoopBase * const eventLoop = wxEventLoop::GetActive(); - wxEventLoop* newEventLoop = NULL; - if (!eventLoop) - { - newEventLoop = new wxEventLoop; - wxEventLoop::SetActive(newEventLoop); - } - + wxEventLoopGuarantor dummyLoopIfNeeded; // Call dispatch at least once so that sockets // can be tested wxTheApp->Dispatch(); @@ -813,12 +806,6 @@ bool wxApp::Yield(bool onlyIfNeeded) #endif ProcessIdle(); - if (newEventLoop) - { - wxEventLoop::SetActive(NULL); - delete newEventLoop; - } - s_inYield = false; }