#include "wx/memory.h"
#include "wx/gdicmn.h"
#include "wx/module.h"
+ #include "wx/crt.h"
#endif
#include "wx/evtloop.h"
// 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();
#endif
ProcessIdle();
- if (newEventLoop)
- {
- wxEventLoop::SetActive(NULL);
- delete newEventLoop;
- }
-
s_inYield = false;
}