mirror of
https://github.com/reactos/reactos.git
synced 2025-08-02 20:17:19 +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
1 changed files with 6 additions and 12 deletions
|
@ -249,7 +249,7 @@ co_IntCallWindowProc(WNDPROC Proc,
|
||||||
HMENU APIENTRY
|
HMENU APIENTRY
|
||||||
co_IntLoadSysMenuTemplate()
|
co_IntLoadSysMenuTemplate()
|
||||||
{
|
{
|
||||||
LRESULT Result;
|
LRESULT Result = 0;
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
PVOID ResultPointer;
|
PVOID ResultPointer;
|
||||||
ULONG ResultLength;
|
ULONG ResultLength;
|
||||||
|
@ -264,23 +264,20 @@ co_IntLoadSysMenuTemplate()
|
||||||
0,
|
0,
|
||||||
&ResultPointer,
|
&ResultPointer,
|
||||||
&ResultLength);
|
&ResultLength);
|
||||||
|
if (NT_SUCCESS(Status))
|
||||||
/* Simulate old behaviour: copy into our local buffer */
|
{
|
||||||
Result = *(LRESULT*)ResultPointer;
|
/* Simulate old behaviour: copy into our local buffer */
|
||||||
|
Result = *(LRESULT*)ResultPointer;
|
||||||
|
}
|
||||||
|
|
||||||
UserEnterCo();
|
UserEnterCo();
|
||||||
|
|
||||||
if (!NT_SUCCESS(Status))
|
|
||||||
{
|
|
||||||
return(0);
|
|
||||||
}
|
|
||||||
return (HMENU)Result;
|
return (HMENU)Result;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL APIENTRY
|
BOOL APIENTRY
|
||||||
co_IntLoadDefaultCursors(VOID)
|
co_IntLoadDefaultCursors(VOID)
|
||||||
{
|
{
|
||||||
LRESULT Result;
|
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
PVOID ResultPointer;
|
PVOID ResultPointer;
|
||||||
ULONG ResultLength;
|
ULONG ResultLength;
|
||||||
|
@ -297,9 +294,6 @@ co_IntLoadDefaultCursors(VOID)
|
||||||
&ResultPointer,
|
&ResultPointer,
|
||||||
&ResultLength);
|
&ResultLength);
|
||||||
|
|
||||||
/* Simulate old behaviour: copy into our local buffer */
|
|
||||||
Result = *(LRESULT*)ResultPointer;
|
|
||||||
|
|
||||||
UserEnterCo();
|
UserEnterCo();
|
||||||
|
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue