]> 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 cf9ad8b1af2b39fd343d633c5e6bcce0dde4878b..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)