]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/toplvcmn.cpp
fix typo in drawing slider ticks; added assert to check for it (slightly modified...
[wxWidgets.git] / src / common / toplvcmn.cpp
index fd659ac2b6dc471d135492165aaf4d30632538ce..b1af3fdd14ece11311c8a76ec6b20c08d2bf198e 100644 (file)
@@ -30,6 +30,7 @@
 #ifndef WX_PRECOMP
     #include "wx/toplevel.h"
     #include "wx/dcclient.h"
+    #include "wx/app.h"
 #endif // WX_PRECOMP
 
 // ----------------------------------------------------------------------------
@@ -85,12 +86,12 @@ bool wxTopLevelWindowBase::Destroy()
     return TRUE;
 }
 
-/* static */
-bool wxTopLevelWindowBase::IsLastBeforeExit()
+bool wxTopLevelWindowBase::IsLastBeforeExit() const
 {
     // we exit the application if there are no more top level windows left
     // normally but wxApp can prevent this from happening
-    return (wxTopLevelWindows.GetCount() == 1) &&
+    return wxTopLevelWindows.GetCount() == 1 &&
+            wxTopLevelWindows.GetFirst()->GetData() == (wxWindow *)this &&
             wxTheApp && wxTheApp->GetExitOnFrameDelete();
 }