]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/toplevel.cpp
removed assert which became incorrect after last change
[wxWidgets.git] / src / motif / toplevel.cpp
index 8b54b2175c7239e9f0ce93f74166dd698d1123a5..5f2891a4e5ff1f7324412208fb1fadce5d97f838 100644 (file)
@@ -17,7 +17,7 @@
 // headers
 // ----------------------------------------------------------------------------
 
-#if defined(__GNUG__) && !defined(__APPLE__)
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
     #pragma implementation "toplevel.h"
 #endif
 
@@ -66,8 +66,6 @@ static void wxTLWEventHandler( Widget wid,
 
 void wxTopLevelWindowMotif::PreDestroy()
 {
-    wxTopLevelWindows.DeleteObject(this);
-
     if ( (GetWindowStyleFlag() & wxDIALOG_MODAL) != wxDIALOG_MODAL )
         wxModelessWindows.DeleteObject(this);
 
@@ -90,17 +88,6 @@ void wxTopLevelWindowMotif::PreDestroy()
 wxTopLevelWindowMotif::~wxTopLevelWindowMotif()
 {
     SetMainWidget( (WXWidget)0 );
-
-    // If this is the last top-level window, exit.
-    if (wxTheApp && (wxTopLevelWindows.GetCount() == 0))
-    {
-        wxTheApp->SetTopWindow(NULL);
-
-        if (wxTheApp->GetExitOnFrameDelete())
-        {
-            wxTheApp->ExitMainLoop();
-        }
-    }
 }
 
 void wxTopLevelWindowMotif::Init()