From bca27719fef2e86c0b4f909e3c4c2a1b2671b234 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 7 Oct 2012 22:38:32 +0000 Subject: [PATCH] Flush log messages from other threads on shutdown too. Add a call to wxLog::FlushActive() to the shutdown code as calling just wxLog::SetActiveTarget(NULL) is not enough, it flushes the current log target only but not the ones used by other threads. Closes #14595. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72629 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/init.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/common/init.cpp b/src/common/init.cpp index 7b836cd88e..ee45254523 100644 --- a/src/common/init.cpp +++ b/src/common/init.cpp @@ -410,6 +410,11 @@ static void DoCommonPostCleanup() delete wxMessageOutput::Set(NULL); #if wxUSE_LOG + // call this first as it has a side effect: in addition to flushing all + // logs for this thread, it also flushes everything logged from other + // threads + wxLog::FlushActive(); + // and now delete the last logger as well // // we still don't disable log target auto-vivification even if any log