From 8ca785b7810f58d94bdaf519cc99f7d10663de32 Mon Sep 17 00:00:00 2001 From: Thomas Bluemel Date: Tue, 16 Dec 2003 18:14:39 +0000 Subject: [PATCH] deny destroying a window that does not belong to the calling thread svn path=/trunk/; revision=7090 --- reactos/subsys/win32k/ntuser/window.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/reactos/subsys/win32k/ntuser/window.c b/reactos/subsys/win32k/ntuser/window.c index 578fd336249..91d753217d6 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.163 2003/12/14 17:59:16 navaraf Exp $ +/* $Id: window.c,v 1.164 2003/12/16 18:14:39 weiden Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -1466,8 +1466,8 @@ NtUserDestroyWindow(HWND Wnd) return FALSE; } - /* Check for desktop window */ - if (IntIsDesktopWindow(Window)) + /* Check for owner thread and desktop window */ + if ((Window->OwnerThread != PsGetCurrentThread()) || IntIsDesktopWindow(Window)) { IntReleaseWindowObject(Window); SetLastWin32Error(ERROR_ACCESS_DENIED);