wineboot: Ignore 0 result from WM_QUERYENDSESSION if target window was destroyed.

This commit is contained in:
Ken Thomases 2014-01-16 21:11:10 -06:00 committed by Alexandre Julliard
parent ed3ed03519
commit a05b53894a
1 changed files with 8 additions and 0 deletions

View File

@ -100,6 +100,14 @@ static void CALLBACK end_session_message_callback( HWND hwnd, UINT msg, ULONG_PT
msg == WM_QUERYENDSESSION ? "WM_QUERYENDSESSION" : (msg == WM_ENDSESSION ? "WM_ENDSESSION" : "Unknown"),
hwnd, lresult );
/* If the window was destroyed while the message was in its queue, SendMessageCallback()
calls us with a default 0 result. Ignore it. */
if (!lresult && !IsWindow( hwnd ))
{
WINE_TRACE( "window was destroyed; ignoring FALSE lresult\n" );
lresult = TRUE;
}
/* we only care if a WM_QUERYENDSESSION response is FALSE */
cb_data->result = cb_data->result && lresult;