]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/frame.cpp
wxMimeTypesManagerImpl::GetFileTypeFromMimeType() implemented
[wxWidgets.git] / src / gtk1 / frame.cpp
index 707f419dec814f82a2a77b6352f4cb743eb5c5ee..993bbbf75b240d67a1be76ccff89c4195e31b098 100644 (file)
@@ -193,7 +193,16 @@ wxFrame::~wxFrame()
     if (m_frameToolBar) delete m_frameToolBar;
 
     wxTopLevelWindows.DeleteObject( this );
-    if (wxTopLevelWindows.Number() == 0) wxTheApp->ExitMainLoop();
+    
+    if (wxTheApp->GetTopWindow() == this)
+    {
+        wxTheApp->SetTopWindow( (wxWindow*) NULL );
+    }
+    
+    if (wxTopLevelWindows.Number() == 0)
+    {  
+        wxTheApp->ExitMainLoop();
+    }
 }
 
 bool wxFrame::Show( bool show )