Commit b4d3cb59 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

Avoid crashes if window belongs to another process.

parent 9c6ba054
...@@ -150,7 +150,7 @@ static BOOL WIN_HaveToDelayNCPAINT( HWND hwnd, UINT uncFlags) ...@@ -150,7 +150,7 @@ static BOOL WIN_HaveToDelayNCPAINT( HWND hwnd, UINT uncFlags)
while ((hwnd = GetAncestor( hwnd, GA_PARENT ))) while ((hwnd = GetAncestor( hwnd, GA_PARENT )))
{ {
WND* parentWnd = WIN_FindWndPtr( hwnd ); WND* parentWnd = WIN_FindWndPtr( hwnd );
if (!(parentWnd->dwStyle & WS_CLIPCHILDREN) && parentWnd->hrgnUpdate) if (parentWnd && !(parentWnd->dwStyle & WS_CLIPCHILDREN) && parentWnd->hrgnUpdate)
{ {
WIN_ReleaseWndPtr( parentWnd ); WIN_ReleaseWndPtr( parentWnd );
return TRUE; return TRUE;
...@@ -335,7 +335,7 @@ static void RDW_ValidateParent(WND *wndChild) ...@@ -335,7 +335,7 @@ static void RDW_ValidateParent(WND *wndChild)
while (parent && parent != GetDesktopWindow()) while (parent && parent != GetDesktopWindow())
{ {
WND *wndParent = WIN_FindWndPtr( parent ); WND *wndParent = WIN_FindWndPtr( parent );
if (!(wndParent->dwStyle & WS_CLIPCHILDREN)) if (wndParent && !(wndParent->dwStyle & WS_CLIPCHILDREN))
{ {
if (wndParent->hrgnUpdate != 0) if (wndParent->hrgnUpdate != 0)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment