]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/appbase.cpp
Make wxPORTRAIT and wxLANDSCAPE elements of wxPrintOrientation enum.
[wxWidgets.git] / src / common / appbase.cpp
index 77820cd5bb8fb74e43055029baa76c62cf5e396f..f2bed9aca81dc2336602f5fe32fed92659826434 100644 (file)
@@ -154,6 +154,10 @@ wxAppConsoleBase::wxAppConsoleBase()
 
 wxAppConsoleBase::~wxAppConsoleBase()
 {
+    // we're being destroyed and using this object from now on may not work or
+    // even crash so don't leave dangling pointers to it
+    ms_appInstance = NULL;
+
     delete m_traits;
 }
 
@@ -535,7 +539,7 @@ void wxAppConsoleBase::DeletePendingEvents()
 
 bool wxAppConsoleBase::IsScheduledForDestruction(wxObject *object) const
 {
-    return wxPendingDelete.Member(object) != NULL;
+    return wxPendingDelete.Member(object);
 }
 
 void wxAppConsoleBase::ScheduleForDestruction(wxObject *object)
@@ -1046,6 +1050,11 @@ wxDefaultAssertHandler(const wxString& file,
 
 wxAssertHandler_t wxTheAssertHandler = wxDefaultAssertHandler;
 
+void wxSetDefaultAssertHandler()
+{
+    wxTheAssertHandler = wxDefaultAssertHandler;
+}
+
 void wxOnAssert(const wxString& file,
                 int line,
                 const wxString& func,