When there is no display, the default log target will log nowhere.

Switch to wxLogStderr before writing the failure message.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16827 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Mattia Barbon
2002-08-27 20:31:49 +00:00
parent fe5af006f1
commit c88b736cb9

View File

@@ -580,6 +580,8 @@ bool wxApp::OnInitGui()
argv);
if (!dpy) {
// if you don't log to stderr, nothing will be shown...
delete wxLog::SetActiveTarget(new wxLogStderr);
wxString className(wxTheApp->GetClassName());
wxLogError(_("wxWindows could not open display for '%s': exiting."),
(const char*) className);