From da1d313d806da94e50b592e88b3ac233a3043a6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Thu, 1 Jul 2004 07:40:57 +0000 Subject: [PATCH] fixed a bug that prevented wxLogGui from being used by default git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28125 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/appbase.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/common/appbase.cpp b/src/common/appbase.cpp index 7296444c79..d15e4a5d41 100644 --- a/src/common/appbase.cpp +++ b/src/common/appbase.cpp @@ -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;