]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mgl/toplevel.cpp
Applied patch [ 1435340 ] Add support of wxToggleButton to wxGenericValidator
[wxWidgets.git] / src / mgl / toplevel.cpp
index 69bbdf584a5b2233d68e6ce4fceef088ab6c8808..80646a601ffb27f3691971fc03bb5596aee64649 100644 (file)
 #pragma hdrstop
 #endif
 
-#include "wx/defs.h"
-#include "wx/toplevel.h"
-#include "wx/app.h"
+#ifndef WX_PRECOMP
+    #include "wx/defs.h"
+    #include "wx/toplevel.h"
+    #include "wx/app.h"
+#endif // WX_PRECOMP
+
 #include "wx/mgl/private.h"
 
 // ----------------------------------------------------------------------------
@@ -115,8 +118,8 @@ wxTopLevelWindowMGL::~wxTopLevelWindowMGL()
     if (wxTheApp->GetTopWindow() == this)
         wxTheApp->SetTopWindow(NULL);
 
-    if ((wxTopLevelWindows.Number() == 0) &&
-        (wxTheApp->GetExitOnFrameDelete()))
+    if (wxTopLevelWindows.IsEmpty() &&
+        wxTheApp->GetExitOnFrameDelete())
     {
         wxTheApp->ExitMainLoop();
     }