]> git.saurik.com Git - wxWidgets.git/blobdiff - src/x11/app.cpp
undid change of r44565: not taking hyphens into account entirely is a bad idea as...
[wxWidgets.git] / src / x11 / app.cpp
index 90ea2a60af89ebf1e8eee0b0eb7f657091ec3a13..4c9868ce0c98d82ce22c26087c671eb3912a98af 100644 (file)
@@ -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;
     }