X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/86f8d1a8bbb08c7e74bb2819d5380ec6d40b73a5..1f020bfb92275cbc5130526d2bc12f4da15b13f2:/src/common/appbase.cpp diff --git a/src/common/appbase.cpp b/src/common/appbase.cpp index f8c77f5342..d15e4a5d41 100644 --- a/src/common/appbase.cpp +++ b/src/common/appbase.cpp @@ -6,7 +6,7 @@ // Created: 19.06.2003 (extracted from common/appcmn.cpp) // RCS-ID: $Id$ // Copyright: (c) 2003 Vadim Zeitlin -// License: wxWidgets license +// License: wxWindows license /////////////////////////////////////////////////////////////////////////////// // ============================================================================ @@ -128,6 +128,12 @@ wxAppConsole::~wxAppConsole() bool wxAppConsole::Initialize(int& argc, wxChar **argv) { + // If some code logged something before wxApp instance was created, + // wxLogStderr was set as the target. Undo it here by destroying the + // current target. It will be re-created next time logging is needed, but + // this time wxAppTraits will be used: + delete wxLog::SetActiveTarget(NULL); + // remember the command line arguments this->argc = argc; this->argv = argv;