mirror of
https://github.com/reactos/reactos.git
synced 2024-09-19 09:09:53 +00:00
fixed missing window dereferences and a minor thread-safety bug
svn path=/trunk/; revision=9167
This commit is contained in:
parent
b6da18c3a0
commit
fb5087e80c
|
@ -16,7 +16,7 @@
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* 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
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -193,12 +193,12 @@ NtUserGetProp(HWND hWnd, ATOM Atom)
|
||||||
|
|
||||||
IntLockWindowProperties(WindowObject);
|
IntLockWindowProperties(WindowObject);
|
||||||
Prop = IntGetProp(WindowObject, Atom);
|
Prop = IntGetProp(WindowObject, Atom);
|
||||||
IntUnLockWindowProperties(WindowObject);
|
|
||||||
if (Prop != NULL)
|
if (Prop != NULL)
|
||||||
{
|
{
|
||||||
Data = Prop->Data;
|
Data = Prop->Data;
|
||||||
}
|
}
|
||||||
|
IntUnLockWindowProperties(WindowObject);
|
||||||
|
IntReleaseWindowObject(WindowObject);
|
||||||
return(Data);
|
return(Data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -229,19 +229,20 @@ IntSetProp(PWINDOW_OBJECT Wnd, ATOM Atom, HANDLE Data)
|
||||||
BOOL STDCALL
|
BOOL STDCALL
|
||||||
NtUserSetProp(HWND hWnd, ATOM Atom, HANDLE Data)
|
NtUserSetProp(HWND hWnd, ATOM Atom, HANDLE Data)
|
||||||
{
|
{
|
||||||
PWINDOW_OBJECT Wnd;
|
PWINDOW_OBJECT WindowObject;
|
||||||
BOOL ret;
|
BOOL ret;
|
||||||
|
|
||||||
if (!(Wnd = IntGetWindowObject(hWnd)))
|
if (!(WindowObject = IntGetWindowObject(hWnd)))
|
||||||
{
|
{
|
||||||
SetLastWin32Error(ERROR_INVALID_WINDOW_HANDLE);
|
SetLastWin32Error(ERROR_INVALID_WINDOW_HANDLE);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
IntLockWindowProperties(Wnd);
|
IntLockWindowProperties(WindowObject);
|
||||||
ret = IntSetProp(Wnd, Atom, Data);
|
ret = IntSetProp(WindowObject, Atom, Data);
|
||||||
IntUnLockWindowProperties(Wnd);
|
IntUnLockWindowProperties(WindowObject);
|
||||||
|
|
||||||
|
IntReleaseWindowObject(WindowObject);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue