From c44ac169e6dcee32c6721ffe5d8182a3d0334d78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20van=20Geldorp?= Date: Wed, 7 Apr 2004 08:25:40 +0000 Subject: [PATCH] There can never be a parent/child relationship between windows if one of them is invalid. Fixes bug #217. svn path=/trunk/; revision=8998 --- reactos/lib/user32/windows/window.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/reactos/lib/user32/windows/window.c b/reactos/lib/user32/windows/window.c index 72bb81d0419..f2a60f70690 100644 --- a/reactos/lib/user32/windows/window.c +++ b/reactos/lib/user32/windows/window.c @@ -1,4 +1,4 @@ -/* $Id: window.c,v 1.105 2004/04/02 23:54:26 weiden Exp $ +/* $Id: window.c,v 1.106 2004/04/07 08:25:40 gvg Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS user32.dll @@ -1018,6 +1018,11 @@ BOOL STDCALL IsChild(HWND hWndParent, HWND hWnd) { + if (! IsWindow(hWndParent) || ! IsWindow(hWnd)) + { + return FALSE; + } + do { hWnd = (HWND)NtUserGetWindowLong(hWnd, GWL_HWNDPARENT, FALSE);