#endif
 
     if (initialized) {
+        if ( m_exitOnFrameDelete == Later ) {
+            m_exitOnFrameDelete = Yes;
+        }
+
         retval = wxApp::MainLoop();
         OnExit();
     }
 }
 
 
-
 // Start the user application, user App's OnInit method is a parameter here
 PyObject* __wxStart(PyObject* /* self */, PyObject* args)
 {