diff --git a/docs/changes.txt b/docs/changes.txt index 2d6e6e6240..8002f548ac 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -99,6 +99,7 @@ All: - Added wxT_2() for forward compatibility with wxWidgets 3. Use it in initialization of wxCmdLineEntryDesc struct elements and (very few) other places where wxT() is required currently but won't be allowed in v3. +- Fixed crash on exit caused by deleting old logger in wxLogChain dtor. All (GUI): diff --git a/src/common/log.cpp b/src/common/log.cpp index 22a549cc5d..c9bb302da0 100644 --- a/src/common/log.cpp +++ b/src/common/log.cpp @@ -199,7 +199,7 @@ void wxLogVerbose(const wxChar *szFormat, ...) if ( wxLog::IsEnabled() && wxLog::IsAllowedTraceMask(mask) ) { wxString msg; msg << _T("(") << mask << _T(") ") << wxString::FormatV(szFormat, argptr); - + wxLog::OnLog(wxLOG_Trace, msg, time(NULL)); } } @@ -631,7 +631,7 @@ wxLogChain::wxLogChain(wxLog *logger) wxLogChain::~wxLogChain() { - delete m_logOld; + wxLog::SetActiveTarget(m_logOld); if ( m_logNew != this ) delete m_logNew;