X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4a92d4bc8d0e435c0d0df29a34300e19656c75d5..b9efe021b554fa3967d1442cf758435c5cd5ae8f:/src/common/appbase.cpp?ds=sidebyside diff --git a/src/common/appbase.cpp b/src/common/appbase.cpp index c2c7b05bf7..0892aab62d 100644 --- a/src/common/appbase.cpp +++ b/src/common/appbase.cpp @@ -68,7 +68,7 @@ #endif // __WXMAC__ #ifdef __WXDEBUG__ - #ifdef wxUSE_STACKWALKER + #if wxUSE_STACKWALKER #include "wx/stackwalk.h" #ifdef __WXMSW__ #include "wx/msw/debughlp.h" @@ -142,14 +142,6 @@ wxAppConsole::~wxAppConsole() bool wxAppConsole::Initialize(int& argc, wxChar **argv) { -#if wxUSE_LOG - // 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); -#endif // wxUSE_LOG - // remember the command line arguments this->argc = argc; this->argv = argv; @@ -710,14 +702,17 @@ bool DoShowAssertDialog(const wxString& msg) return false; } +#if wxUSE_STACKWALKER static wxString GetAssertStackTrace() { wxString stackTrace; +#if wxUSE_DBGHELP // check that we can get the stack trace before trying to do it if ( !wxDbgHelpDLL::Init() ) return stackTrace; - +#endif + class StackDump : public wxStackWalker { public: @@ -773,6 +768,7 @@ static wxString GetAssertStackTrace() return stackTrace; } +#endif // wxUSE_STACKWALKER // show the assert modal dialog static