From b4d3cb599ea90753fa4993f21169bedbd44a4380 Mon Sep 17 00:00:00 2001 From: Dmitry Timoshkov Date: Thu, 13 Jun 2002 21:56:12 +0000 Subject: [PATCH] Avoid crashes if window belongs to another process. --- windows/painting.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/windows/painting.c b/windows/painting.c index 1acf92186c..33fdd81d89 100644 --- a/windows/painting.c +++ b/windows/painting.c @@ -150,7 +150,7 @@ static BOOL WIN_HaveToDelayNCPAINT( HWND hwnd, UINT uncFlags) while ((hwnd = GetAncestor( hwnd, GA_PARENT ))) { WND* parentWnd = WIN_FindWndPtr( hwnd ); - if (!(parentWnd->dwStyle & WS_CLIPCHILDREN) && parentWnd->hrgnUpdate) + if (parentWnd && !(parentWnd->dwStyle & WS_CLIPCHILDREN) && parentWnd->hrgnUpdate) { WIN_ReleaseWndPtr( parentWnd ); return TRUE; @@ -335,7 +335,7 @@ static void RDW_ValidateParent(WND *wndChild) while (parent && parent != GetDesktopWindow()) { WND *wndParent = WIN_FindWndPtr( parent ); - if (!(wndParent->dwStyle & WS_CLIPCHILDREN)) + if (wndParent && !(wndParent->dwStyle & WS_CLIPCHILDREN)) { if (wndParent->hrgnUpdate != 0) { -- 2.32.0.93.g670b81a890