Don't log error from wxMSW wxWakeUpIdle().

This is not necessary as there is nothing that can be done about this error
anyhow and the function still "works" even if it occurs (it doesn't wake up
anything but it is not necessary to do it if the message queue is already
full) and, worse, results in a crash due to stack overflow.

Closes #15951.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75834 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2014-02-07 15:02:23 +00:00
parent 0dd099f3c5
commit 696e4323aa

View File

@@ -819,11 +819,15 @@ void wxApp::WakeUpIdle()
if ( !::PeekMessage(&msg, hwndTop, 0, 1, PM_NOREMOVE) || if ( !::PeekMessage(&msg, hwndTop, 0, 1, PM_NOREMOVE) ||
::PeekMessage(&msg, hwndTop, 1, 1, PM_NOREMOVE) ) ::PeekMessage(&msg, hwndTop, 1, 1, PM_NOREMOVE) )
{ {
if ( !::PostMessage(hwndTop, WM_NULL, 0, 0) ) // If this fails too, there is really not much we can do, but then
{ // neither do we need to, as it normally indicates that the window
// should never happen // queue is full to the brim with the messages and so the main loop
wxLogLastError(wxT("PostMessage(WM_NULL)")); // is running and doesn't need to be woken up.
} //
// Notice that we especially should not try use wxLogLastError()
// here as this would lead to another call to wxWakeUpIdle() from
// inside wxLog and stack overflow due to the resulting recursion.
::PostMessage(hwndTop, WM_NULL, 0, 0);
} }
} }
#if wxUSE_THREADS #if wxUSE_THREADS