mirror of
https://github.com/reactos/reactos.git
synced 2025-05-31 23:18:39 +00:00
[WIN32K]
Fix DC reference leak in IntPolygon. svn path=/trunk/; revision=70180
This commit is contained in:
parent
99cbcf396b
commit
7ceb06e329
1 changed files with 14 additions and 7 deletions
|
@ -165,13 +165,20 @@ IntGdiPolyPolygon(DC *dc,
|
||||||
BOOL FASTCALL
|
BOOL FASTCALL
|
||||||
IntPolygon(HDC hdc, POINT *Point, int Count)
|
IntPolygon(HDC hdc, POINT *Point, int Count)
|
||||||
{
|
{
|
||||||
PDC dc;
|
BOOL bResult;
|
||||||
if (!(dc = DC_LockDc(hdc)))
|
PDC pdc;
|
||||||
{
|
|
||||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
pdc = DC_LockDc(hdc);
|
||||||
return FALSE;
|
if (pdc == NULL)
|
||||||
}
|
{
|
||||||
return IntGdiPolygon(dc, Point, Count);
|
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
bResult = IntGdiPolygon(pdc, Point, Count);
|
||||||
|
|
||||||
|
DC_UnlockDc(pdc);
|
||||||
|
return bResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue