Commit 69d39ab0 authored by Jean-Claude Batista's avatar Jean-Claude Batista Committed by Alexandre Julliard

Ensure the validity of hOldFocus before calling WIN_GetTopParent.

parent f6e40961
......@@ -1855,7 +1855,7 @@ BOOL WINPOS_SetActiveWindow( HWND hWnd, BOOL fMouse, BOOL fChangeFocus)
{
HWND hOldFocus = PERQDATA_GetFocusWnd( pNewActiveQueue->pQData );
if ( WIN_GetTopParent( hOldFocus ) != hwndActive )
if ( hOldFocus && WIN_GetTopParent( hOldFocus ) != hwndActive )
FOCUS_SwitchFocus( pNewActiveQueue, hOldFocus,
(wndPtr && (wndPtr->dwStyle & WS_MINIMIZE))?
0 : hwndActive );
......
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