]> git.saurik.com Git - wxWidgets.git/commitdiff
don't create wxEventLoop in Initialize(), it's too early to do it there -- wait until...
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 24 May 2007 12:28:31 +0000 (12:28 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 24 May 2007 12:28:31 +0000 (12:28 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46197 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/appbase.cpp

index 9fdb525f7796dce16b7cad00b07b0f6dbbe28dd4..993d4a8d5397e4d178e6f0d6bbe56eae40079d42 100644 (file)
@@ -171,9 +171,6 @@ bool wxAppConsole::Initialize(int& argcOrig, wxChar **argvOrig)
     wxPendingEventsLocker = new wxCriticalSection;
 #endif
 
-    // create port-specific main loop
-    m_mainLoop = CreateMainLoop();
-
 #ifndef __WXPALMOS__
     if ( m_appName.empty() && argv )
     {
@@ -192,8 +189,11 @@ wxEventLoopBase *wxAppConsole::CreateMainLoop()
 
 void wxAppConsole::CleanUp()
 {
-    delete m_mainLoop;
-    m_mainLoop = NULL;
+    if ( m_mainLoop )
+    {
+        delete m_mainLoop;
+        m_mainLoop = NULL;
+    }
 
     delete wxPendingEvents;
     wxPendingEvents = NULL;