This is a quick hack: if there is no global wxMessageOutput instance, and

there is a wxApp instance, call wxTheApp->DoInit() to initialize the
global wxMessageOutput instance. The correct solution is to ensure that
wxApp::DoInit is always called.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16343 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Mattia Barbon
2002-08-01 19:58:32 +00:00
parent 0cf8b31be5
commit e02911a260

View File

@@ -50,6 +50,16 @@ wxMessageOutput* wxMessageOutput::ms_msgOut = 0;
wxMessageOutput* wxMessageOutput::Get()
{
// FIXME this is an hack
static bool inGet = FALSE;
if(!ms_msgOut && wxTheApp && !inGet)
{
inGet = TRUE;
wxTheApp->DoInit();
}
inGet = FALSE;
return ms_msgOut;
}