Add IsWindow() checks after SendMessage() returns.

This commit is contained in:
Ulrich Weigand 1999-03-24 15:01:29 +00:00 committed by Alexandre Julliard
parent d24cc27967
commit 85d52b35c3
2 changed files with 10 additions and 0 deletions

View File

@ -444,6 +444,12 @@ BOOL PAINT_RedrawWindow( HWND hwnd, const RECT *rectUpdate,
}
}
if ( !IsWindow( hwnd ) )
{
WIN_ReleaseWndPtr(wndPtr);
return TRUE;
}
/* Recursively process children */
if (!(flags & RDW_NOCHILDREN) &&

View File

@ -976,6 +976,8 @@ static void EVENT_ConfigureNotify( WND *pWnd, XConfigureEvent *event )
/* Send WM_WINDOWPOSCHANGING */
SendMessageA( winpos.hwnd, WM_WINDOWPOSCHANGING, 0, (LPARAM)&winpos );
if (!IsWindow( winpos.hwnd )) return;
/* Calculate new position and size */
newWindowRect.left = x;
@ -987,6 +989,8 @@ static void EVENT_ConfigureNotify( WND *pWnd, XConfigureEvent *event )
&pWnd->rectWindow, &pWnd->rectClient,
&winpos, &newClientRect );
if (!IsWindow( winpos.hwnd )) return;
hrgnOldPos = CreateRectRgnIndirect( &pWnd->rectWindow );
hrgnNewPos = CreateRectRgnIndirect( &newWindowRect );
CombineRgn( hrgnOldPos, hrgnOldPos, hrgnNewPos, RGN_DIFF );