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:
@@ -50,6 +50,16 @@ wxMessageOutput* wxMessageOutput::ms_msgOut = 0;
|
|||||||
|
|
||||||
wxMessageOutput* wxMessageOutput::Get()
|
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;
|
return ms_msgOut;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user