X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6ed897586a72ef2d7d7c8393bf8f75220d7bc160..1c405bb51093fc7812fb66e7d47faac5707e02b5:/src/mgl/app.cpp diff --git a/src/mgl/app.cpp b/src/mgl/app.cpp index a542b5c24f..c6fab2dc9b 100644 --- a/src/mgl/app.cpp +++ b/src/mgl/app.cpp @@ -265,8 +265,9 @@ bool wxApp::OnInitGui() #ifdef __WXDEBUG__ // MGL redirects stdout and stderr to physical console, so lets redirect // it to file. Do it only when WXDEBUG environment variable is set - if ( wxGetEnv(wxT("WXDEBUG"), NULL) ) - freopen("output.err", "wt", stderr); + wxString redirect; + if ( wxGetEnv(wxT("WXSTDERR"), &redirect) ) + freopen(redirect.mb_str(), "wt", stderr); #endif wxLog *oldLog = wxLog::SetActiveTarget(new wxLogGui);