From f1ed0e4313c09281a8d286845a828bb408bd277b Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Sat, 21 Sep 2013 12:52:11 -0700 Subject: [PATCH] Fix display of automation errors on startup The wxLogger isn't created until it's needed by the main thread, so any errors logged on a background thread before the logger was first used on the main thread were simply being discarded. Fix this by forcing the creation of the logger very early in the startup process. --- aegisub/src/main.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/aegisub/src/main.cpp b/aegisub/src/main.cpp index 7151b0433..dc1d64524 100644 --- a/aegisub/src/main.cpp +++ b/aegisub/src/main.cpp @@ -112,6 +112,10 @@ bool AegisubApp::OnInit() { SetAppName("aegisub"); #endif + // The logger isn't created on demand on background threads, so force it to + // be created now + (void)wxLog::GetActiveTarget(); + // Set the global locale to the utf-8 version of the current locale std::locale::global(boost::locale::generator().generate("")); boost::filesystem::path::imbue(std::locale());