mirror of
https://github.com/reactos/reactos.git
synced 2024-09-28 21:44:31 +00:00
- co_IntLoadSysMenuTemplate: only copy buffer if prior operation succeeded, bug #4803
- co_IntLoadDefaultCursors: result is not used, no need to copy it svn path=/trunk/; revision=42822
This commit is contained in:
parent
f5396c2fb8
commit
d93536f7a1
|
@ -249,7 +249,7 @@ co_IntCallWindowProc(WNDPROC Proc,
|
|||
HMENU APIENTRY
|
||||
co_IntLoadSysMenuTemplate()
|
||||
{
|
||||
LRESULT Result;
|
||||
LRESULT Result = 0;
|
||||
NTSTATUS Status;
|
||||
PVOID ResultPointer;
|
||||
ULONG ResultLength;
|
||||
|
@ -264,23 +264,20 @@ co_IntLoadSysMenuTemplate()
|
|||
0,
|
||||
&ResultPointer,
|
||||
&ResultLength);
|
||||
|
||||
/* Simulate old behaviour: copy into our local buffer */
|
||||
Result = *(LRESULT*)ResultPointer;
|
||||
if (NT_SUCCESS(Status))
|
||||
{
|
||||
/* Simulate old behaviour: copy into our local buffer */
|
||||
Result = *(LRESULT*)ResultPointer;
|
||||
}
|
||||
|
||||
UserEnterCo();
|
||||
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
return(0);
|
||||
}
|
||||
return (HMENU)Result;
|
||||
}
|
||||
|
||||
BOOL APIENTRY
|
||||
co_IntLoadDefaultCursors(VOID)
|
||||
{
|
||||
LRESULT Result;
|
||||
NTSTATUS Status;
|
||||
PVOID ResultPointer;
|
||||
ULONG ResultLength;
|
||||
|
@ -297,9 +294,6 @@ co_IntLoadDefaultCursors(VOID)
|
|||
&ResultPointer,
|
||||
&ResultLength);
|
||||
|
||||
/* Simulate old behaviour: copy into our local buffer */
|
||||
Result = *(LRESULT*)ResultPointer;
|
||||
|
||||
UserEnterCo();
|
||||
|
||||
if (!NT_SUCCESS(Status))
|
||||
|
|
Loading…
Reference in a new issue