Commit in reactos/subsys/win32k/ntuser on MAIN
prop.c+9-81.9 -> 1.10
fixed missing window dereferences and a minor thread-safety bug

reactos/subsys/win32k/ntuser
prop.c 1.9 -> 1.10
diff -u -r1.9 -r1.10
--- prop.c	24 Feb 2004 13:27:03 -0000	1.9
+++ prop.c	16 Apr 2004 21:50:26 -0000	1.10
@@ -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: prop.c,v 1.9 2004/02/24 13:27:03 weiden Exp $
+/* $Id: prop.c,v 1.10 2004/04/16 21:50:26 weiden Exp $
  *
  * COPYRIGHT:        See COPYING in the top level directory
  * PROJECT:          ReactOS kernel
@@ -193,12 +193,12 @@
   
   IntLockWindowProperties(WindowObject);
   Prop = IntGetProp(WindowObject, Atom);
-  IntUnLockWindowProperties(WindowObject);
   if (Prop != NULL)
   {
     Data = Prop->Data;
   }
-
+  IntUnLockWindowProperties(WindowObject);
+  IntReleaseWindowObject(WindowObject);
   return(Data);
 }
 
@@ -229,19 +229,20 @@
 BOOL STDCALL
 NtUserSetProp(HWND hWnd, ATOM Atom, HANDLE Data)
 {
-  PWINDOW_OBJECT Wnd;
+  PWINDOW_OBJECT WindowObject;
   BOOL ret;
 
-  if (!(Wnd = IntGetWindowObject(hWnd)))
+  if (!(WindowObject = IntGetWindowObject(hWnd)))
   {
     SetLastWin32Error(ERROR_INVALID_WINDOW_HANDLE);
     return FALSE;
   }
   
-  IntLockWindowProperties(Wnd);
-  ret = IntSetProp(Wnd, Atom, Data);
-  IntUnLockWindowProperties(Wnd);
+  IntLockWindowProperties(WindowObject);
+  ret = IntSetProp(WindowObject, Atom, Data);
+  IntUnLockWindowProperties(WindowObject);
   
+  IntReleaseWindowObject(WindowObject);
   return ret;
 }
 
CVSspam 0.2.8