From e02911a260d9002ca40c328a44cf62e0bf67b68d Mon Sep 17 00:00:00 2001 From: Mattia Barbon Date: Thu, 1 Aug 2002 19:58:32 +0000 Subject: [PATCH] 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 --- src/common/msgout.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/common/msgout.cpp b/src/common/msgout.cpp index c677a6bef1..512c9b6268 100755 --- a/src/common/msgout.cpp +++ b/src/common/msgout.cpp @@ -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; } -- 2.45.2