wxLogChain::wxLogChain(wxLog *logger)
{
+ m_bPassMessages = TRUE;
+
m_logNew = logger;
m_logOld = wxLog::SetActiveTarget(this);
}
wxLogChain::~wxLogChain()
{
- delete m_logNew;
+ delete m_logOld;
+
+ if ( m_logNew != this )
+ delete m_logNew;
}
void wxLogChain::SetLog(wxLog *logger)
if ( m_logNew != this )
delete m_logNew;
- wxLog::SetActiveTarget(logger);
-
m_logNew = logger;
}