Fixed GetTopWindow so it will correctly handle the NULL parameter.

This commit is contained in:
Francis Beaudet 1999-05-22 10:46:30 +00:00 committed by Alexandre Julliard
parent 6315a7f334
commit b7e8e8002d
1 changed files with 7 additions and 1 deletions

View File

@ -2529,7 +2529,13 @@ HWND16 WINAPI GetTopWindow16( HWND16 hwnd )
HWND WINAPI GetTopWindow( HWND hwnd )
{
HWND retval;
WND * wndPtr = WIN_FindWndPtr( hwnd );
WND * wndPtr = NULL;
if (hwnd!=0)
wndPtr = WIN_FindWndPtr( hwnd );
else
wndPtr = WIN_GetDesktop();
if (wndPtr && wndPtr->child)
{
retval = wndPtr->child->hwndSelf;