diff --git a/src/common/log.cpp b/src/common/log.cpp index d1e30401d4..72e1b385d1 100644 --- a/src/common/log.cpp +++ b/src/common/log.cpp @@ -714,8 +714,10 @@ void wxLogWindow::DoLog(wxLogLevel level, const char *szString) ((wxLogWindow *)m_pOldLog)->DoLog(level, szString); } - // and this will format it nicely and call our DoLogString() - wxLog::DoLog(level, szString); + if ( m_pLogFrame ) { + // and this will format it nicely and call our DoLogString() + wxLog::DoLog(level, szString); + } m_bHasMessages = TRUE; } @@ -756,9 +758,6 @@ wxLogWindow::~wxLogWindow() { // may be NULL if log frame already auto destroyed itself delete m_pLogFrame; - - // delete the old log - delete m_pOldLog; } #endif //WX_TEST_MINIMAL