Commit a05b5389 authored by Ken Thomases's avatar Ken Thomases Committed by Alexandre Julliard

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

parent ed3ed035
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment