From bd2d8839f42eaf29eca43cbd66da266fa568c99a Mon Sep 17 00:00:00 2001 From: Vincent Povirk Date: Thu, 18 Dec 2008 23:58:18 -0600 Subject: [PATCH] user32: set an error in SetParent if parent == hwnd --- dlls/user32/win.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/user32/win.c b/dlls/user32/win.c index 34491fe..5680e11 100644 --- a/dlls/user32/win.c +++ b/dlls/user32/win.c @@ -2684,7 +2684,7 @@ HWND WINAPI SetParent( HWND hwnd, HWND parent ) WND *wndPtr; BOOL ret; - if (is_broadcast(hwnd) || is_broadcast(parent)) + if (is_broadcast(hwnd) || is_broadcast(parent) || hwnd == parent) { SetLastError(ERROR_INVALID_PARAMETER); return 0; -- 1.6.0.5