Stop DCE_GetVisRect dereferencing a null wndPtr.

This commit is contained in:
Lawson Whitney 1999-07-18 18:23:20 +00:00 committed by Alexandre Julliard
parent d6baf1bb1a
commit 9fd10756ad
1 changed files with 2 additions and 3 deletions

View File

@ -377,10 +377,9 @@ static BOOL DCE_GetVisRect( WND *wndPtr, BOOL clientArea, RECT *lprect )
INT xoffset = lprect->left;
INT yoffset = lprect->top;
while( !(wndPtr->flags & WIN_NATIVE) )
while( !(wndPtr->flags & WIN_NATIVE) &&
( wndPtr = WIN_LockWndPtr(wndPtr->parent)) )
{
wndPtr = WIN_LockWndPtr(wndPtr->parent);
if ( (wndPtr->dwStyle & (WS_ICONIC | WS_VISIBLE)) != WS_VISIBLE )
{
WIN_ReleaseWndPtr(wndPtr);