X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a20599da8927acccff3b2ce1c8f5478f2d68a90a..6270539bcf24f2ec32150a09f8aad383f5de0671:/src/common/init.cpp diff --git a/src/common/init.cpp b/src/common/init.cpp index 9343b390f1..f6cc91b350 100644 --- a/src/common/init.cpp +++ b/src/common/init.cpp @@ -70,8 +70,8 @@ public: // we need a special kind of auto pointer to wxApp which not only deletes the // pointer it holds in its dtor but also resets the global application pointer -wxDECLARE_SCOPED_PTR(wxAppConsole, wxAppPtrBase); -wxDEFINE_SCOPED_PTR(wxAppConsole, wxAppPtrBase); +wxDECLARE_SCOPED_PTR(wxAppConsole, wxAppPtrBase) +wxDEFINE_SCOPED_PTR(wxAppConsole, wxAppPtrBase) class wxAppPtr : public wxAppPtrBase { @@ -400,17 +400,13 @@ void wxEntryCleanup() int wxEntryReal(int& argc, wxChar **argv) { -#if wxUSE_LOG - // Create a non-GUI log target, to be used until GUI (if any) is ready. - // Target will be reset by wxAppConsole::Initialize, when GUI logging will work. - wxLog::GetActiveTarget(); -#endif - // library initialization if ( !wxEntryStart(argc, argv) ) { +#if wxUSE_LOG // flush any log messages explaining why we failed delete wxLog::SetActiveTarget(NULL); +#endif return -1; }