mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-16 03:07:31 +00:00
Ensure the validity of hOldFocus before calling WIN_GetTopParent.
This commit is contained in:
parent
f6e4096194
commit
69d39ab023
|
@ -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 );
|
||||
|
|
Loading…
Reference in a new issue