From 85d52b35c3a8bce4c07459d78e0b0fb64a460896 Mon Sep 17 00:00:00 2001 From: Ulrich Weigand Date: Wed, 24 Mar 1999 15:01:29 +0000 Subject: [PATCH] Add IsWindow() checks after SendMessage() returns. --- windows/painting.c | 6 ++++++ windows/x11drv/event.c | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/windows/painting.c b/windows/painting.c index 3eb9f99e87..8ca4063357 100644 --- a/windows/painting.c +++ b/windows/painting.c @@ -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) && diff --git a/windows/x11drv/event.c b/windows/x11drv/event.c index a1bdbf87ff..0abcbb4464 100644 --- a/windows/x11drv/event.c +++ b/windows/x11drv/event.c @@ -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 ); -- 2.32.0.93.g670b81a890