Fix regression with logging messages during wxApp initialization.
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 4 Sep 2009 00:27:51 +0000 (00:27 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 4 Sep 2009 00:27:51 +0000 (00:27 +0000)
commita20844525f329c8387191dbde0eab86693412851
tree8d835cab2128a4bb765a79c37f74afbebf2661e5
parentf432e6777dbd45c868c411397010d9f315687de3
Fix regression with logging messages during wxApp initialization.

Changes in r61450 broke logging of the messages for errors occurring during
wxApp initialization, such as the message about the failure to establish
connection to the X server. Instead of being shown on stderr, wxLogGui was
used resulting in a crash. Creating wxLogOutputBest in wxLog code before
wxTheApp creation was not enough as this error occurred after wxTheApp
creation -- but before it became usable.

Fix this by explicitly asking wxLog to instantiate a safe log target in
DoCommonPreInit() if the user hadn't set up his own yet and using it until the
GUI is fully initialized.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61825 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
src/common/init.cpp