mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 09:25:10 +00:00
[GDI32]
Set correct last error code in GetClipRgn. Fixes regression from r58089. svn path=/trunk/; revision=58099
This commit is contained in:
parent
0fea31f7a2
commit
aeb1964acb
1 changed files with 12 additions and 1 deletions
|
@ -700,7 +700,18 @@ GetClipRgn(
|
|||
HRGN hrgn
|
||||
)
|
||||
{
|
||||
INT Ret = NtGdiGetRandomRgn(hdc, hrgn, CLIPRGN);
|
||||
INT Ret;
|
||||
|
||||
/* Check if DC handle is valid */
|
||||
if (!GdiGetDcAttr(hdc))
|
||||
{
|
||||
/* Last error code differs from what NtGdiGetRandomRgn returns */
|
||||
SetLastError(ERROR_INVALID_PARAMETER);
|
||||
return 0;
|
||||
}
|
||||
|
||||
Ret = NtGdiGetRandomRgn(hdc, hrgn, CLIPRGN);
|
||||
|
||||
// if (Ret)
|
||||
// {
|
||||
// if(GetLayout(hdc) & LAYOUT_RTL) MirrorRgnDC(hdc,(HRGN)Ret, NULL);
|
||||
|
|
Loading…
Reference in a new issue