Fixed GetTopWindow so it will correctly handle the NULL parameter.
This commit is contained in:
parent
6315a7f334
commit
b7e8e8002d
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue