#if wxUSE_GUI
wxMessageBox(s_szBuf, _("Fatal Error"), wxID_OK | wxICON_STOP);
#else
- fprintf(stderr, _("Fatal error: %s\n"), s_szBuf);
+ wxFprintf(stderr, _("Fatal error: %s\n"), s_szBuf);
#endif
abort();
wxLogChain::wxLogChain(wxLog *logger)
{
+ m_bPassMessages = TRUE;
+
m_logNew = logger;
m_logOld = wxLog::SetActiveTarget(this);
}
-void wxLogChain::SetLog(wxLog *logger)
+wxLogChain::~wxLogChain()
{
+ delete m_logOld;
+
if ( m_logNew != this )
delete m_logNew;
+}
- wxLog::SetActiveTarget(logger);
+void wxLogChain::SetLog(wxLog *logger)
+{
+ if ( m_logNew != this )
+ delete m_logNew;
m_logNew = logger;
}