From dfa957c31031ebb133db5f5d1802164d458be655 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20van=20Geldorp?= Date: Wed, 31 Mar 2004 19:20:18 +0000 Subject: [PATCH] IntGetParentObject() does it's own locking, prevent double lock svn path=/trunk/; revision=8937 --- reactos/subsys/win32k/ntuser/window.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/reactos/subsys/win32k/ntuser/window.c b/reactos/subsys/win32k/ntuser/window.c index 27f9d77fc99..69cab7938fb 100644 --- a/reactos/subsys/win32k/ntuser/window.c +++ b/reactos/subsys/win32k/ntuser/window.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: window.c,v 1.205 2004/03/31 18:37:12 gvg Exp $ +/* $Id: window.c,v 1.206 2004/03/31 19:20:18 gvg Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -2616,7 +2616,6 @@ NtUserGetWindow(HWND hWnd, UINT Relationship) return NULL; } - IntLockRelatives(WindowObject); switch (Relationship) { case GW_HWNDFIRST: @@ -2642,28 +2641,35 @@ NtUserGetWindow(HWND hWnd, UINT Relationship) break; case GW_HWNDNEXT: + IntLockRelatives(WindowObject); if (WindowObject->NextSibling) hWndResult = WindowObject->NextSibling->Self; + IntUnLockRelatives(WindowObject); break; case GW_HWNDPREV: + IntLockRelatives(WindowObject); if (WindowObject->PrevSibling) hWndResult = WindowObject->PrevSibling->Self; + IntUnLockRelatives(WindowObject); break; case GW_OWNER: + IntLockRelatives(WindowObject); if((Parent = IntGetWindowObject(WindowObject->Owner))) { hWndResult = Parent->Self; IntReleaseWindowObject(Parent); } + IntUnLockRelatives(WindowObject); break; case GW_CHILD: + IntLockRelatives(WindowObject); if (WindowObject->FirstChild) hWndResult = WindowObject->FirstChild->Self; + IntUnLockRelatives(WindowObject); break; } - IntUnLockRelatives(WindowObject); IntReleaseWindowObject(WindowObject);