Window handle is not valid anymore when the object is in "destroyed" state
Modified: trunk/reactos/subsys/win32k/ntuser/window.c
--- trunk/reactos/subsys/win32k/ntuser/window.c 2005-09-09 09:48:33 UTC (rev 17758) +++ trunk/reactos/subsys/win32k/ntuser/window.c 2005-09-09 09:50:58 UTC (rev 17759) @@ -117,7 +117,7 @@
if (!hWnd) return NULL; Window = (PWINDOW_OBJECT)UserGetObject(&gHandleTable, hWnd, otWindow);
- if (!Window)
+ if (!Window || 0 != (Window->Status & WINDOWSTATUS_DESTROYED))
{ SetLastWin32Error(ERROR_INVALID_WINDOW_HANDLE); return NULL;