mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 19:03:00 +00:00
[CARDS]
Fix GDI leak. Patch by mudhead. CORE-7854 #resolve #comment Fixed in revision 62498, thanks ;) svn path=/trunk/; revision=62498
This commit is contained in:
parent
4314bf948d
commit
7c7bd121c5
1 changed files with 4 additions and 2 deletions
|
@ -169,13 +169,15 @@ BOOL WINAPI cdtDrawExt(HDC hdc, INT x, INT y, INT dx, INT dy, INT card, INT type
|
||||||
if (type == ectEMPTY || type == ectERASE)
|
if (type == ectEMPTY || type == ectERASE)
|
||||||
{
|
{
|
||||||
POINT pPoint;
|
POINT pPoint;
|
||||||
HBRUSH hBrush;
|
HBRUSH hBrush, hOldBrush;
|
||||||
|
|
||||||
hBrush = CreateSolidBrush(color);
|
hBrush = CreateSolidBrush(color);
|
||||||
GetDCOrgEx(hdc, &pPoint);
|
GetDCOrgEx(hdc, &pPoint);
|
||||||
SetBrushOrgEx(hdc, pPoint.x, pPoint.y, 0);
|
SetBrushOrgEx(hdc, pPoint.x, pPoint.y, 0);
|
||||||
SelectObject(hdc, hBrush);
|
hOldBrush = SelectObject(hdc, hBrush);
|
||||||
PatBlt(hdc, x, y, dx, dy, PATCOPY);
|
PatBlt(hdc, x, y, dx, dy, PATCOPY);
|
||||||
|
SelectObject(hdc, hOldBrush);
|
||||||
|
DeleteObject(hBrush);
|
||||||
}
|
}
|
||||||
if (type != ectERASE)
|
if (type != ectERASE)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue