]> git.saurik.com Git - wxWidgets.git/commitdiff
When there is no display, the default log target will log nowhere.
authorMattia Barbon <mbarbon@cpan.org>
Tue, 27 Aug 2002 20:31:49 +0000 (20:31 +0000)
committerMattia Barbon <mbarbon@cpan.org>
Tue, 27 Aug 2002 20:31:49 +0000 (20:31 +0000)
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

src/motif/app.cpp

index 1671394ca08d286975df03edb74ad27d66768d50..34fdebf6809238943122f1f9acb4bb128fb71899 100644 (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);