fix log target auto creation broken by recent changes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61432 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -294,7 +294,7 @@ wxLog::OnLog(wxLogLevel level,
|
||||
else
|
||||
#endif // wxUSE_THREADS
|
||||
{
|
||||
logger = ms_pLogger;
|
||||
logger = GetMainThreadActiveTarget();
|
||||
if ( !logger )
|
||||
return;
|
||||
}
|
||||
@@ -464,6 +464,12 @@ wxLog *wxLog::GetActiveTarget()
|
||||
}
|
||||
#endif // wxUSE_THREADS
|
||||
|
||||
return GetMainThreadActiveTarget();
|
||||
}
|
||||
|
||||
/* static */
|
||||
wxLog *wxLog::GetMainThreadActiveTarget()
|
||||
{
|
||||
if ( ms_bAutoCreate && ms_pLogger == NULL ) {
|
||||
// prevent infinite recursion if someone calls wxLogXXX() from
|
||||
// wxApp::CreateLogTarget()
|
||||
|
Reference in New Issue
Block a user