mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 22:52:54 +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
|
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 (Ret)
|
||||||
// {
|
// {
|
||||||
// if(GetLayout(hdc) & LAYOUT_RTL) MirrorRgnDC(hdc,(HRGN)Ret, NULL);
|
// if(GetLayout(hdc) & LAYOUT_RTL) MirrorRgnDC(hdc,(HRGN)Ret, NULL);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue